[opensuse] OS 12.1 postfix config for remote mail server
Hi, all -- I have a shiny new host running 12.1 with postfix (I was a qmail guy back when I had time to dig hard into email config, but I'll give this a try), and in general everything works well -- although I'm still moving in and it also feels like everything is in disarray :-)/2 In particular, I can send email to any domain not hosted on the server just fine, but when I send to myself or to any other domain hosted here it never gets anywhere. The server is managed by plesk, and I'm confident that it has been told that those domains are local and so it is trying to deliver to all of those addresses and aliases that don't really exist here. [I hemmed and hawed for a long time about what to do with email for some or all of my domains and finally decided to take advantage of the space and cycles on the mail farm and outsource that whole mess. We'll see how it goes in the long run :-] The MX records point to the mail farm servers: myhost # dig +short mx example.com 0 mx01.1and1.com. 0 mx00.1and1.com. I sent myself a test message: myhost # date | mailx -s 'local test' user@example.com The log files confirm that it's trying to deliver locally and, of course, can't: myhost # grep '29 05:51:' mail.err Apr 29 05:51:37 myhost postfix-local[20170]: cannot chdir to mailname dir user: No such file or directory Apr 29 05:51:37 myhost postfix-local[20170]: Unknown user: user@example.com myhost # grep '29 05:51:' mail.warn Apr 29 05:51:37 myhost postfix-local[20170]: cannot chdir to mailname dir user: No such file or directory Apr 29 05:51:37 myhost postfix-local[20170]: Unknown user: user@example.com myhost # grep '29 05:51:' mail.info Apr 29 05:51:37 myhost postfix/pickup[18835]: 0518875E: uid=0 from=<root> Apr 29 05:51:37 myhost postfix/cleanup[20165]: 0518875E: message-id=<20140429095137.0518875E@myhost.example.com> Apr 29 05:51:37 myhost postfix/qmgr[4170]: 0518875E: from=<root@myhost.example.com>, size=533, nrcpt=1 (queue active) Apr 29 05:51:37 myhost postfix-local[20170]: postfix-local: from=root@myhost.example.com, to=user@example.com, dirname=/var/qmail/mailnames Apr 29 05:51:37 myhost postfix-local[20170]: cannot chdir to mailname dir user: No such file or directory Apr 29 05:51:37 myhost postfix-local[20170]: Unknown user: user@example.com Apr 29 05:51:37 myhost postfix/pipe[20168]: 0518875E: to=<user@example.com>, relay=plesk_virtual, delay=0.2, delays=0.08/0.01/0/0.11, dsn=2.0.0, status=sent (delivered via plesk_virtual service) Apr 29 05:51:37 myhost postfix/qmgr[4170]: 0518875E: removed A few things jump out at me here... First, yes, it's trying to send locally. Second, though, I noticed that I didn't get a bounce message back, so it may also be having trouble delivering even to an account that *does* exist. Third, what is /var/qmail/mailnames doing in there on this postfix server? *sigh* I hate having not done any of this for 15 years and having to start over from scratch... How do I tell postfix that it doesn't have to try to deliver locally but instead hand off to the mx server for a given domain? In fact, how do I tell it to hand off for everything except perhaps certain local addresses? TIA & HAND :-D -- David T-G -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
David T-G wrote:
The MX records point to the mail farm servers:
myhost # dig +short mx example.com 0 mx01.1and1.com. 0 mx00.1and1.com.
I sent myself a test message:
myhost # date | mailx -s 'local test' user@example.com
The log files confirm that it's trying to deliver locally and, of course, can't:
myhost # grep '29 05:51:' mail.err Apr 29 05:51:37 myhost postfix-local[20170]: cannot chdir to mailname dir user: No such file or directory Apr 29 05:51:37 myhost postfix-local[20170]: Unknown user: user@example.com
It is presumably trying to do a local delivery, but the local destination does not exist. Does 'user' exist or have a virtual mailbox on your machine?
A few things jump out at me here... First, yes, it's trying to send locally. Second, though, I noticed that I didn't get a bounce message back, so it may also be having trouble delivering even to an account that *does* exist.
Yep, that sounds plausible.
Third, what is /var/qmail/mailnames doing in there on this postfix server?
Check your postfix config, maybe it needs changing.
How do I tell postfix that it doesn't have to try to deliver locally but instead hand off to the mx server for a given domain?
postfix will deliver locally for domains listed with "mydestination" or "virtual_domains". (lots of exceptions, but that will suffice).
In fact, how do I tell it to hand off for everything except perhaps certain local addresses?
You want "user1@example.com" to be delivered locally, but "anything.else@example.com" to be delivered to the MX ? Don't let your mailserver be "example.com", then alias "user1@example.com" to a "user@local.net". -- Per Jessen, Zürich (13.4°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per, et al -- On Tue, Apr 29, 2014 at 01:52:58PM +0200, Per Jessen wrote: % % David T-G wrote: % ... % > mailname dir user: No such file or directory Apr 29 05:51:37 myhost % > postfix-local[20170]: Unknown user: user@example.com % % It is presumably trying to do a local delivery, but the local That's my hypothesis as well. % destination does not exist. Does 'user' exist or have a virtual % mailbox on your machine? No and no. Yes, "davidtg" exists locally and expects, say, to receive local cron mail reports and such, but no real mail should be handled. % ... % > Third, what is /var/qmail/mailnames doing in there % > on this postfix server? % % Check your postfix config, maybe it needs changing. Oh, I bet it does :-) Got any pointers? % % > How do I tell postfix that it doesn't have to try to deliver locally % > but instead hand off to the mx server for a given domain? % % postfix will deliver locally for domains listed with "mydestination" % or "virtual_domains". (lots of exceptions, but that will suffice). Hmmm.. I find /var/spool/postfix/plesk/virtual_domains.db when I go looking. Is that what you mean? And I suspect that I don't find the source file because it's all maintained within plesk, which makes things more ... interesting :-| % % > In fact, how do I tell it to hand off for everything except perhaps % > certain local addresses? % % You want "user1@example.com" to be delivered locally, % but "anything.else@example.com" to be delivered to the MX ? Actually, delivery for all users at local.dom.ain.name and handed off for everything else. And I could probably even accept *all* mail handed off remotely and remember to redirect all cron jobs accordingly if I had to, although that's definitely suboptimal. % % Don't let your mailserver be "example.com", then % alias "user1@example.com" to a "user@local.net". I have a *lot* of aliases within this domain (and a few others, actually, but I didn't want to confuse things too much), only some of which are going to point to me and could thus be delivered locally but also which would be unwieldy to manage in two places (on the mail server for the world to get to me and locally so that I can send and manage). That gets cumbersome, too. I have a lot of addresses within this domain (and also a few others, actually, but I didn't want to confuse things too much :-) but also a lot of other addresses for folks who *don't* do mail locally and thus would have to be delivered off to the mail farm. That sounds like a mess to try to manage :-( Thanks again & HAND :-D -- David T-G -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 29/04/2014 19:21, David T-G a écrit :
Per, et al --
% Check your postfix config, maybe it needs changing.
Oh, I bet it does :-) Got any pointers?
http://dodin.info/wiki/index.php?n=Doc.Postfix-configure-2 I just succeed :-) last thing that blocked: some options needs a stop then a start, the postfix reload is not enough... jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
jdd wrote:
Le 29/04/2014 19:21, David T-G a écrit :
Per, et al --
% Check your postfix config, maybe it needs changing.
Oh, I bet it does :-) Got any pointers?
http://dodin.info/wiki/index.php?n=Doc.Postfix-configure-2
I just succeed :-)
last thing that blocked: some options needs a stop then a start, the postfix reload is not enough...
Changes to main.cf usually do not require a restart, whereas changes to master.cf usually do. -- Per Jessen, Zürich (12.7°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 29/04/2014 20:31, Per Jessen a écrit :
Changes to main.cf usually do not require a restart, whereas changes to master.cf usually do.
interfaces change needed one :-( jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
jdd wrote:
Le 29/04/2014 20:31, Per Jessen a écrit :
Changes to main.cf usually do not require a restart, whereas changes to master.cf usually do.
interfaces change needed one :-(
You're right, I forgot about that one. -- Per Jessen, Zürich (10.8°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi again, all -- On Tue, Apr 29, 2014 at 07:32:28PM +0200, jdd wrote: % % Le 29/04/2014 19:21, David T-G a ?crit : % % >Oh, I bet it does :-) Got any pointers? % % http://dodin.info/wiki/index.php?n=Doc.Postfix-configure-2 % % I just succeed :-) Thanks so much! I've read it twice, and my head is still spinning a bit, and I'll save this to read it again a few times more :-) In the end, I finally got clever and googled for plesk and how to stop local delivery. Shockingly, there's a little checkbox under 'settings' on the 'Mail' tab for each domain which allows one to activate (or not) mail service for the domain. Hah! Almost as if these folks were writing a control panel or something... Anyway, all of my mail to my list of domains is now handed off to the farm for processing; yay. Thanks to all for all of the help! Next to go back to researching when Plesk will support a fairly modern OpenSuSE so that I can upgrade or rehost... % % last thing that blocked: some options needs a stop then a start, the % postfix reload is not enough... Yup. Lots of hangups as I went through all of the domains. Thanks again & HANN :-D -- David T-G -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
David T-G wrote:
Per, et al --
On Tue, Apr 29, 2014 at 01:52:58PM +0200, Per Jessen wrote: % % David T-G wrote: % ... % > mailname dir user: No such file or directory Apr 29 05:51:37 myhost % > postfix-local[20170]: Unknown user: user@example.com % % It is presumably trying to do a local delivery, but the local
That's my hypothesis as well.
% destination does not exist. Does 'user' exist or have a virtual % mailbox on your machine?
No and no. Yes, "davidtg" exists locally and expects, say, to receive local cron mail reports and such, but no real mail should be handled.
Then postfix expects to handle mail for your domain "example.com".
% > Third, what is /var/qmail/mailnames doing in there % > on this postfix server? % % Check your postfix config, maybe it needs changing.
Oh, I bet it does :-) Got any pointers?
Hehe, sorry - look at config directives such as "mailbox_dir" or mailbox_base (can't remember which it is). Maybe also "virtual_mailbox_base" etc.
% > How do I tell postfix that it doesn't have to try to deliver locally % > but instead hand off to the mx server for a given domain? % % postfix will deliver locally for domains listed with "mydestination" % or "virtual_domains". (lots of exceptions, but that will suffice).
Hmmm.. I find
/var/spool/postfix/plesk/virtual_domains.db
when I go looking. Is that what you mean?
Yep, that will work too. Slightly odd location, but postfix doesn't care where it is put.
And I suspect that I don't find the source file because it's all maintained within plesk, which makes things more ... interesting :-|
Yeah .... can't help with that, I know nothing about plesk.
% > In fact, how do I tell it to hand off for everything except perhaps % > certain local addresses? % % You want "user1@example.com" to be delivered locally, % but "anything.else@example.com" to be delivered to the MX ?
Actually, delivery for all users at local.dom.ain.name and handed off for everything else.
Okay, that's pretty much the standard config - mydestination would suffice, but having local.dom.ain.name in virtual_domains.db also does it.
I have a *lot* of aliases within this domain (and a few others, actually, but I didn't want to confuse things too much), only some of which are going to point to me and could thus be delivered locally but also which would be unwieldy to manage in two places (on the mail server for the world to get to me and locally so that I can send and manage).
That's okay, aliases are easy to deal with.
That gets cumbersome, too. I have a lot of addresses within this domain (and also a few others, actually, but I didn't want to confuse things too much :-) but also a lot of other addresses for folks who *don't* do mail locally and thus would have to be delivered off to the mail farm. That sounds like a mess to try to manage :-(
Basically your mailserver with have one domain assigned, optionally plus a number of virtual domains. Local delivery will apply to the one domain and all virtual. If individual addresses need delivery elsewhere, that can be done with aliasing. I'm off to Munich to see some old friends and have some beer, I'll be back Sunday. -- Per Jessen, Zürich (12.7°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Content-ID: <alpine.LSU.2.11.1404291430290.20923@minas-tirith.valinor> El 2014-04-29 a las 06:15 -0400, David T-G escribió:
Hi, all --
I have a shiny new host running 12.1 with postfix (I was a qmail guy back
New? 12.1 is obsolete, it gets no maintenance. No security patches. - -- Cheers Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlNfm4YACgkQja8UbcUWM1whEwD8D43XPZPJ0PEy69JWWO8VwKUC gUeg9kBz3NWlVwvg0KQA/1Feq0mkResKCZNs1pmrX159RkLzTSOrwM7S1djQk+AT =hP8Z -----END PGP SIGNATURE-----
Carlos, et al -- On Tue, Apr 29, 2014 at 02:30:44PM +0200, Carlos E. R. wrote: % % El 2014-04-29 a las 06:15 -0400, David T-G escribi??: % % >I have a shiny new host running 12.1 with postfix (I was a qmail guy back % % New? % 12.1 is obsolete, it gets no maintenance. No security patches. Wait, what? I knew it was old (I'm looking forward to Plesk supporting 13 or newer), but didn't realize that it was no longer maintained. % % - -- Cheers % Carlos E. R. :-D -- David T-G -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Apr 29, 2014 at 12:32 PM, David T-G <d13@justpickone.org> wrote:
Carlos, et al --
On Tue, Apr 29, 2014 at 02:30:44PM +0200, Carlos E. R. wrote: % % El 2014-04-29 a las 06:15 -0400, David T-G escribi??: % % >I have a shiny new host running 12.1 with postfix (I was a qmail guy back % % New? % 12.1 is obsolete, it gets no maintenance. No security patches.
Wait, what? I knew it was old (I'm looking forward to Plesk supporting 13 or newer), but didn't realize that it was no longer maintained.
13.1 and 12.3 are currently supported by the main openSUSE contributor base. 12.1 and 12.2 are out of support by anyone. 13.2 is not expected until November I think, so both 13.1 and 12.3 should be supported through the end of this year (2014). Early in 2015, 12.3 should go out of support. 11.4 was designated for Evergreen support <http://en.opensuse.org/Evergreen#Supported_distributions>, thus it is being supported by the Evergreen team until July 2014. So a few more months. 13.1 has already been designated the next Evergreen release, so it will be supported until roughly fall 2015 by the main contributor base and by the Evergreen team until fall 2016. People that want to only upgrade once every 3 years or so should be on the Evergreen path. That means they should be using the next few months to upgrade from 11.4 to 13.1. Then in a couple years they will need to upgrade to the next Evergreen release. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Carlos E. R.
-
David T-G
-
Greg Freemyer
-
jdd
-
Per Jessen