Re: [blfs-dev] Sendmail issues
Date: Sun, 24 Aug 2014 19:52:54 -0500 From: Bruce Dubbs bruce.du...@gmail.com To: BLFS Development List blfs-dev@lists.linuxfromscratch.org Subject: Re: [blfs-dev] Sendmail issues . . The newaliases command from sendmail is actually the equivalent of running 'sendmail -bi'. The implementation of the postfix version is completely different. That said, the format of the aliases file is defined by sendmail, as is the executable name 'sendmail', and all mail MTAs use the same format. Note that the newaliases command from sendmail does not recognize the switch -v. There is a man page installed for newaliases and there are no valid options. It doesn't - _shouldn't_ - choke on it though: normally 'newaliases -v' just gives the same output as 'newaliases'. That means the command in the book is incorrect. I'll fix it for trunk More 'superfluous' - the '-v' - than incorrect. But yes, 'newaliases' is the common and 'proper' invoc - e.g. per the example commands earlier in the thread. akh at my next commit. -- Bruce -- -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
[blfs-dev] Sendmail issues
Hi again, Building sendmail packages and I hit an issue. Namely, the newaliases -v command seems to hang (or takes forever to complete), rendering my init scripts (well, systemd units) unusable. Does anyone else experience this? I'm still in favor of archiving the package. For now, I can mark it as built because there are no problems with that. -- Note: My last name is not Krejzi. signature.asc Description: OpenPGP digital signature -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Sendmail issues
Date: Mon, 25 Aug 2014 00:24:44 +0200 From: Armin K. kre...@email.com To: BLFS Development List blfs-dev@lists.linuxfromscratch.org Subject: Re: [blfs-dev] Sendmail issues Building sendmail packages and I hit an issue. Namely, the newaliases -v command seems to hang (or takes forever to complete), rendering my Dealing with that head-on: often it'd point towards a resolver-related timeout; and you'd check at least nsswitch.conf and hosts files, or equiv, to make sure there's sensible setup in there; and in particular so that sendmail can sanity-check its own host-machine's name c properly. Even moreso if you're seeing the issue at boot-time: is the requisite infrastruc avail at the point where you'd run newaliases . init scripts (well, systemd units) unusable. Does anyone else experience this? ISTR back at the Igor/Armin kill-stamp-sendmail episode, that perhaps you weren't in the correct dir - e.g. /etc/mail - when issuing the cmd? Does (cd /etc/mail newaliases) [ or (cd /etc/mail; make all;) ] work any better ? Does strace give a better handle? I just copy/pasted the commands from the page. I can confirm that sendmail part works (/usr/sbin/sendmail) as the daemon can be fired up. However, newaliases hangs for me Just to check: are you saying there that newaliases still apparently-hangs when it's issued after the machine is up running? and systemd unit I have provided runs newaliases before starting sendmail, so that would make the boot hang. I . . Had a look at the sysd unit file. What happens if you use 'ExecStartPost' instead of the pre? Also, noted that it uses '=-' and so (IIRC) that means that the command failing won't prevent execution of subsequent commands. As such, the newaliases there is kindof considered a 'nicety'. Again: I would just remove it from startup; it's not cavalier to do so. akh p.s. in an earlier different thread, 'an unit' was used a coupla times: one would really say/write 'a unit'; you'd go by the phonetic ('a you-nit') rather than the spelling ('an u...'), for that partic case. (But by the same 'rules', you _would) say/write, 'an umbrella'). -- -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Sendmail issues
On 08/25/2014 01:36 AM, akhiezer wrote: Date: Mon, 25 Aug 2014 00:24:44 +0200 From: Armin K. kre...@email.com To: BLFS Development List blfs-dev@lists.linuxfromscratch.org Subject: Re: [blfs-dev] Sendmail issues Building sendmail packages and I hit an issue. Namely, the newaliases -v command seems to hang (or takes forever to complete), rendering my Dealing with that head-on: often it'd point towards a resolver-related timeout; and you'd check at least nsswitch.conf and hosts files, or equiv, to make sure there's sensible setup in there; and in particular so that sendmail can sanity-check its own host-machine's name c properly. Even moreso if you're seeing the issue at boot-time: is the requisite infrastruc avail at the point where you'd run newaliases . init scripts (well, systemd units) unusable. Does anyone else experience this? ISTR back at the Igor/Armin kill-stamp-sendmail episode, that perhaps you weren't in the correct dir - e.g. /etc/mail - when issuing the cmd? Does (cd /etc/mail newaliases) [ or (cd /etc/mail; make all;) ] work any better ? I even tried creating /etc/aliases as a symlink to /etc/mail/aliases, but still the command hangs like it waits for input or something like that. SIGINT (CTRL+C) terminates it just fine. I didn't try running it from /etc/mail, but I did from /etc. No difference. I didn't try the second command. Does strace give a better handle? I haven't tried that. I just copy/pasted the commands from the page. I can confirm that sendmail part works (/usr/sbin/sendmail) as the daemon can be fired up. However, newaliases hangs for me Just to check: are you saying there that newaliases still apparently-hangs when it's issued after the machine is up running? Boot hangs for some time (until the timeout period is over and service declared as failed). and systemd unit I have provided runs newaliases before starting sendmail, so that would make the boot hang. I . . Had a look at the sysd unit file. What happens if you use 'ExecStartPost' instead of the pre? No, I haven't. But I suppose it would bring up the daemon and then hang on newaliases. But then again, it would make no sense to run newaliases after daemon has been started, would it? You'd have to restart it again for them to work. Also, noted that it uses '=-' and so (IIRC) that means that the command failing won't prevent execution of subsequent commands. As such, the newaliases there is kindof considered a 'nicety'. Even with - in front of the command, it's still the same. - means ignore non-successful command return (or something like that) rather than scratch the program if it hangs forever Again: I would just remove it from startup; it's not cavalier to do so. I have already done that. akh p.s. in an earlier different thread, 'an unit' was used a coupla times: one would really say/write 'a unit'; you'd go by the phonetic ('a you-nit') rather than the spelling ('an u...'), for that partic case. (But by the same 'rules', you _would) say/write, 'an umbrella'). Right, I get it. I forgout about using it like that, mainly because English is not my native language. Thanks for all the input, I may give strace a go tomorrow. I had to remove sendmail in order to install exim (and then remove it too) and postfix because all 3 of them conflict with each other (more or less), so I'm currently settled on postfix. -- Note: My last name is not Krejzi. signature.asc Description: OpenPGP digital signature -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Sendmail issues
Date: Mon, 25 Aug 2014 01:55:17 +0200 From: Armin K. kre...@email.com To: BLFS Development List blfs-dev@lists.linuxfromscratch.org Subject: Re: [blfs-dev] Sendmail issues Building sendmail packages and I hit an issue. Namely, the newaliases -v command seems to hang (or takes forever to complete), rendering my Dealing with that head-on: often it'd point towards a resolver-related timeout; and you'd check at least nsswitch.conf and hosts files, or equiv, to make sure there's sensible setup in there; and in particular so that sendmail can sanity-check its own host-machine's name c properly. Even moreso if you're seeing the issue at boot-time: is the requisite infrastruc avail at the point where you'd run newaliases . Do bear these in mind. init scripts (well, systemd units) unusable. Does anyone else experience this? ISTR back at the Igor/Armin kill-stamp-sendmail episode, that perhaps you weren't in the correct dir - e.g. /etc/mail - when issuing the cmd? Does (cd /etc/mail newaliases) [ or (cd /etc/mail; make all;) ] work any better ? I even tried creating /etc/aliases as a symlink to /etc/mail/aliases, but still the command hangs like it waits for input or something like that. SIGINT (CTRL+C) terminates it just fine. I didn't try running it from /etc/mail, but I did from /etc. No _Do_ do the (cd /etc/mail newaliases) : do it when the machine is up running settled; i.e. don't try it yet at boot-time. difference. I didn't try the second command. Does strace give a better handle? I haven't tried that. I just copy/pasted the commands from the page. I can confirm that sendmail part works (/usr/sbin/sendmail) as the daemon can be fired up. However, newaliases hangs for me Just to check: are you saying there that newaliases still apparently-hangs when it's issued after the machine is up running? Boot hangs for some time (until the timeout period is over and service declared as failed). Yes, but if you remove 'newaliases' from the unit file - like you've confirmed below that you've now done - and let the machine boot, and settle, and then run 'newaliases', does it still take a long time and then fail? and systemd unit I have provided runs newaliases before starting sendmail, so that would make the boot hang. I . . Had a look at the sysd unit file. What happens if you use 'ExecStartPost' instead of the pre? No, I haven't. But I suppose it would bring up the daemon and then hang on newaliases. But then again, it would make no sense to run newaliases after daemon has been started, would it? You'd have to restart it again for them to work. No, don't need to restart sendmail; running 'newliases' is enough for the changes to take effect. Also, noted that it uses '=-' and so (IIRC) that means that the command failing won't prevent execution of subsequent commands. As such, the newaliases there is kindof considered a 'nicety'. Even with - in front of the command, it's still the same. - means ignore non-successful command return (or something like that) rather than Yes, that's what I mean: whoever wrote the original unit file, by using '=-' is kindof indicating that they're not _too_ bothered if the newaliases part fails; and therefore that's an indication of the realtive unimportance they're attaching to having 'newalises' there. scratch the program if it hangs forever Again: I would just remove it from startup; it's not cavalier to do so. I have already done that. . . I may give strace a go tomorrow. I had to remove sendmail in order to install exim (and then remove it too) and postfix because all 3 of them conflict with each other (more or less), so I'm currently settled on postfix. Had a look at the postfix unit file: would be interesting to see if putting a postifx 'newaliases' command in there, similar to for sendmail; see if it hangs or not. -- -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Sendmail issues
Armin K. wrote: The original mail was written when manually running newaliases -v (as part of the instructions, even before installing the systemd unit) hung. As for the resolver issues, It's a virtual machine and systemd-networkd takes care of bringing up the network (which is confirmed since I can log in through ssh). Network is certainly up when the unit triggers, because it depends on network.target which, as the name says, makes sure that network is brought up. That's ensured by systemd-networkd-wait-online which delays the network.target until the network has been brought up. I can run postfix's newaliases manually just fine, while I can't run the one from sendmail wtihout it hanging as mentioned above. I wonder if the case might be different aliases file structure for the two of them. The newaliases command from sendmail is actually the equivalent of running 'sendmail -bi'. The implementation of the postfix version is completely different. That said, the format of the aliases file is defined by sendmail, as is the executable name 'sendmail', and all mail MTAs use the same format. Note that the newaliases command from sendmail does not recognize the switch -v. There is a man page installed for newaliases and there are no valid options. That means the command in the book is incorrect. I'll fix it for trunk at my next commit. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page