Geek pop quiz: Sendmail edition.
May. 15th, 2007 05:10 pmSo.
Sendmail is installed on my shiny new Ubuntu server. Yes, sendmail - I dropped Postfix because it wouldn't handle a simple damn "smarthost all email to this server on this port using this username and password" command in a reasonable amount of my time configuring it, while sendmail does.
The only problem: My host name is machine.domain.com. It says this everywhere. However, sendmail marks all mail as coming from account@localhost.domain.com
I *want* mail to come from account@domain.com. I would accept account@hostname.domain.com. I have NO IDEA where it's getting the instruction to go with localhost.
I tell it to masquerade as domain.com. I tell it to rewrite all addresses going through as domain.com. Still nothing.
Any clues?
Update 10PM: sat down to look at it again, and decided that when in doubt, use brute force.
aptitude remove sendmail
aptitude clean
rm -rf /etc/mail
mkdir /etc/mail
aptitude install sendmail
sendmailconfig
Problem solved. Elapsed time for this solution: 10 minutes, and it was total overkill, but satisfying. sendmailconfig and "use existing sendmail.mc? N" would probably have done it. Now all the email comes from domain.com, because I TOLD it to masquerade as that during the config, and unlike manually editing sendmail.mc and using make to generate a new sendmail.cf, this time it worked..
(The problem of SASL failing? The password for the account it was sending through stopped working, by coincidence, at the same time. Inquiries have been made with the only other person who *could* have changed it, although he knows better.)
PS: While using line noise to configure an MTA is a royal pain in the ass, at least the MTA gets and stays configured in a reasonable time, unlike, say, exim and postfix.
Sendmail is installed on my shiny new Ubuntu server. Yes, sendmail - I dropped Postfix because it wouldn't handle a simple damn "smarthost all email to this server on this port using this username and password" command in a reasonable amount of my time configuring it, while sendmail does.
The only problem: My host name is machine.domain.com. It says this everywhere. However, sendmail marks all mail as coming from account@localhost.domain.com
I *want* mail to come from account@domain.com. I would accept account@hostname.domain.com. I have NO IDEA where it's getting the instruction to go with localhost.
Any clues?
Update 10PM: sat down to look at it again, and decided that when in doubt, use brute force.
aptitude remove sendmail
aptitude clean
rm -rf /etc/mail
mkdir /etc/mail
aptitude install sendmail
sendmailconfig
Problem solved. Elapsed time for this solution: 10 minutes, and it was total overkill, but satisfying. sendmailconfig and "use existing sendmail.mc? N" would probably have done it. Now all the email comes from domain.com, because I TOLD it to masquerade as that during the config, and unlike manually editing sendmail.mc and using make to generate a new sendmail.cf, this time it worked..
(The problem of SASL failing? The password for the account it was sending through stopped working, by coincidence, at the same time. Inquiries have been made with the only other person who *could* have changed it, although he knows better.)
PS: While using line noise to configure an MTA is a royal pain in the ass, at least the MTA gets and stays configured in a reasonable time, unlike, say, exim and postfix.
(no subject)
Date: 2007-05-15 09:17 pm (UTC)(no subject)
Date: 2007-05-15 09:22 pm (UTC)(no subject)
Date: 2007-05-15 09:35 pm (UTC)(no subject)
Date: 2007-05-15 09:49 pm (UTC)[1]: By virtue of my having copied sendmail.cf before editing it.
(no subject)
Date: 2007-05-16 02:25 am (UTC)Manually editing sendmail.mc and making it generate a new sendmail.cf with make, after telling it to masquerade as the right server name? I had that all along, and it didn't work.
Wiping /etc/mail off the face of the earth, reinstalling sendmail from scratch, and reconfiguring it from totally clean files?
That, that worked.
And the authenticated SMTP problem was unrelated, just coincidentally timed.
(no subject)
Date: 2007-05-15 09:22 pm (UTC)(no subject)
Date: 2007-05-15 09:27 pm (UTC)SASL: Server, port, username, password. That should NOT be hard, and yet it's somehow too complex for Postfix to let me do it.
(no subject)
Date: 2007-05-16 02:39 am (UTC)(no subject)
Date: 2007-05-16 02:56 am (UTC)Either way, I fixed sendmail. It's arcane and ugly and not user friendly, but, unlike postfix and exim, it apparently *does* do smarthosting on a nonstandard port, using a specified username and password, without complaining, and with findable instructions.
That makes it my MTA of choice for the near future, regardless of other considerations, because I'm really not running a proper full mail server. I just need an MTA to handle automated mail from the programs that are running on the machine, like the backups and the ticket tracker.