disable mail handling for one or more domains - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: System Setup & Installation (/forum-32.html) +--- Thread: disable mail handling for one or more domains (/thread-894.html) |
RE: disable mail handling for one or more domains - motin - 09-05-2007 07:55 AM joximu Wrote:manually: edit /etc/postfix/ispcp/domains - make a copy to /etc/ispcp/postfix/working and run "postmap domains" Having the same problem, and tried to follow these instructions but what do they really mean? Edit /etc/postfix/ispcp/domains - is that removing the lines for the domains that has mailservers elsewhere - or changing "vdmn_entry" to something else? Also, postmap domains won't work unless you have such a file in the current directory, so I guess you mean postmap /etc/ispcp/postfix/working/domains ? I put a bracket in front of the line where my mailoutsourced domain was, then copied the file over and ran postmap /etc/ispcp/postfix/working/domains but it still won't work. I get these messages in syslog (replaced my domain with mydomain.net...): Sep 4 23:47:20 ubuntu103 postfix/virtual[700]: 14959BD08A6: to=<test@mydomain.net>, relay=virtual, delay=0, status=bounced (unknown user: "test@mydomain.net") Anybody can shine a light on this matter? RE: disable mail handling for one or more domains - joximu - 09-05-2007 09:20 AM motin Wrote:joximu Wrote:manually: edit /etc/postfix/ispcp/domains - make a copy to /etc/ispcp/postfix/working and run "postmap domains" deactivate the whole line. (see documentation of postfix - it's free...) motin Wrote:Also, postmap domains won't work unless you have such a file in the current directory, so I guess you mean postmap /etc/ispcp/postfix/working/domains ? nope, I mean the same file you just edited one stpe before: /etc/postfix/ispcp/domains motin Wrote:I put a bracket in front of the line where my mailoutsourced domain was, then copied the file over and ran postmap /etc/ispcp/postfix/working/domains but it still won't work. in /etc/ispcp/.../working there are copies of the current configuration. It's often needed that you copy the self modified files also to this place. Otherwise ispCP might overwrite your changes. motin Wrote:I get these messages in syslog (replaced my domain with mydomain.net...): "relay=virtual" means: postfix found the domain to be a local virtual domain and want's to handle the mail in this way... Hope you got a glimpse of light :-) Cheers Joximu RE: disable mail handling for one or more domains - motin - 09-05-2007 09:42 AM Hey thanks for replying so quickly! I had time to do some research before you replied, and with your answers everything is coming together. joximu Wrote:deactivate the whole line. (see documentation of postfix - it's free...) I searched for "domains" in man postfix and instead wanted to try my luck on the forums before reading postfix's fm. Was especially non-motivated to read it since the whole issue here is how to avoid using postfix on the server... Btw that was what I did. When I wrote "bracket" - I meant one of them squares / woodpile / whateverthenameisinenglish characters: # joximu Wrote:nope, I mean the same file you just edited one stpe before: Yeah, I now understand that this update the database file, and running in the other directory will not update the database file that is in current use. "Auto-reply: Exactly" joximu Wrote:"relay=virtual" means: postfix found the domain to be a local virtual domain and want's to handle the mail in this way... Yeah I sure did! Thanks. Now I get some errors that are more understandable to a non-postfix-user: Sep 5 01:23:57 ubuntu103 postfix/smtp[1458]: C981CBD08A7: to=<test@mydomain.net>, relay=none, delay=0, status=deferred (Host or domain name not found. Name service error for name=mydomain.net type=MX: Host not found, try again) Got some forum threads to support me on this one: http://www.isp-control.net/forum/custom-mx-records-for-a-single-domain-t-338.html#pid2532 http://www.isp-control.net/forum/how-to-use-external-mailserver-t-612.html#pid4845 http://www.isp-control.net/forum/remove-a-domain-from-postfix-t-591.html#pid4872 So I'll be allright. In case you have any more light to shed on the DNS matter that would prevent me from doing something I'd regret, you are very welcome to shed it too of course. Cheers! RE: disable mail handling for one or more domains - joximu - 09-05-2007 10:05 AM motin Wrote:Hey thanks for replying so quickly! Well, the filename is not fixed - here's the reference... (main.cf) virtual_mailbox_domains = hash:/etc/postfix/ispcp/domains motin Wrote:and instead wanted to try my luck on the forums before reading postfix's fm. Was especially non-motivated to read it since the whole issue here is how to avoid using postfix on the server... Gartenhag, Rautenzeichen, Number Sign (http://en.wikipedia.org/wiki/Number_sign) :-) motin Wrote:joximu Wrote:nope, I mean the same file you just edited one stpe before: Ah - now it's important, that the DNS knows where the mails (to mydomain.net) have to be send to... So, you'll need to set this in the zone files. Normally in debian etch they are in /var/cache/bind/(*.db) - with a copy in /etc/ispcp/bind/working - you already learned about that :-) the MX line in the zone files should be changed: either you set the new hostname (with a point at the end) or the right ip number there - or you leave mail.domain.. and give the new ip address in the line where mail is defined... orig, some lines: IN MX 10 mail.domain.net. mail IN A 123.45.67.89 www IN A 123.45.67.89 variant 1: IN MX 10 mail.newserver.net. mail IN A 123.45.67.89 www IN A 123.45.67.89 variant 2: IN MX 10 mail.domain.net. mail IN A new.ip.of.mx www IN A 123.45.67.89 or similar... there is an excellent book from oreilly about bind and dns :-))) Cheers, J. RE: disable mail handling for one or more domains - motin - 09-05-2007 11:07 AM joximu Wrote:Well, the filename is not fixed - here's the reference... (main.cf) Aha. Shine a little light on me. Forever and ever, i tell you my... joximu Wrote:Ah - now it's important, that the DNS knows where the mails (to mydomain.net) have to be send to... Actually, I tried these and a third and a fourth variant to no avail even before I read your reply. Problem is, that however I do this (and regardless of how many times I am restarting/reloading bind9), I get no updated replies from dig... (I got no ANSWER section). There is no DNS cache to flush like on windows and I can only suspect TTL settings interfering here but is that normal? I'll wait 86400 seconds and check dig again... Then I can start to think about paperbacks. Btw the 3rd variant I tried (and which is still active) was: Code: IN MX 10 mail.mydomain.net. ...as this is how my external "real" dns is setup - querying mail.mydomain.net gives me a CNAME to mail.mailserver.com. And btw my mail.mailserver.com resolves to my external mail server IP fine. Thanks again for watching! RE: disable mail handling for one or more domains - joximu - 09-05-2007 05:57 PM motin Wrote:joximu Wrote:Ah - now it's important, that the DNS knows where the mails (to mydomain.net) have to be send to... Very important - forgot to tell you: you have to increment the serial number in the zone file... its called timestamp in the comment... most of times it's the date and a 2 letter number: 2007090200 changes on thesame day: 2007090201 2007090202 on the next day 2007090300 I'm sure you got the trick... Have a good day! Joximu RE: disable mail handling for one or more domains - motin - 09-06-2007 07:03 AM Thanks, but I ran into several other problems when trying to configure bind. They are now solved. I had chrooted bind into /var/lib/named/ but the configuration files were put in /var/cache/bind/ instead of the chrooted location. To sum my trial and errors experience up, this is what was needed: Code: chown bind /var/cache/bind/* Some error messages from /var/log/syslog I encountered on the way (to help googlers): Code: # originally: Now the mails are delivered through my external mail server. Thanks for all the bright guidance, joximu! RE: disable mail handling for one or more domains - joximu - 09-06-2007 04:40 PM motin Wrote:Thanks, but I ran into several other problems when trying to configure bind. They are now solved. /var/lib/named is like in openSuSE, but Debian has /var/cache/bind (I also had to learn this :-). But you can configure ispcp to put the files elsewhere... /etc/ispcp/ispcp.conf - I made an extra file for the ispcp-domains and then "included" in named.conf - a named reload copied the file into the chroot... (in openSuSE) motin Wrote:To sum my trial and errors experience up, this is what was needed: Last line, hm... ispcp itself writes the "working" files... so there is no need for seetting to user "bind"... motin Wrote:Some error messages from /var/log/syslog I encountered on the way (to help googlers): Your welcome :-) thanx for the reputation <g> |