Results 1 to 2 of 2
Hello, I have been spending a day and a half reading all the threads I could find about the topic (and there's a lot of them). Yet I could never ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-06-2009 #1
- Join Date
- Mar 2007
Yet another victim of sendmail/masquerade
I have been spending a day and a half reading all the threads I could find about the topic (and there's a lot of them). Yet I could never find the answer to my problem.
So here it is:
I have a mail server behind a gateway.
Postfix is configured and running, but for some reason, when procmail is invoked for some email copy/forwarding, it calls /usr/sbin/sendmail
This wouldn't be a very big deal if sendmail was using the right domain.
Instead of sending copies of our emails from user@domain, it sends them from firstname.lastname@example.org, which leads in most cases to our forwarded emails as spam by the final mailbox.
This sets the context of my story.
Now to the heart of the problem.
The idea is, we don't use the sendmail service (which is down), just the command /usr/sbin/sendmail
using the command /bin/mail gives the same result.
I was trying to force sendmail to replace localhostname.domain by domain using masquerade.
Here is the relevant part of my sendmail.mc:
MASQUERADE_AS(`domain')dnl FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl MASQUERADE_DOMAIN(domain)dnl
/usr/sbin/sendmail -bt /tryflags ES /try esmtp email@example.com ... final returns: user@domain Rcode = 0, addr = user@domain
/usr/sbin/sendmail -v someaddress@somedomain >>> EHLO localhostname.domain >>> MAIL From:<firstname.lastname@example.org> size=*** >>> RCPT To:<someaddress@somedomain> >>> DATA >>> . >>> QUIT
I could get the EHLO command to be sent with domain only by making modifications to submit.mc and doing a make, but could not find why is the RCPT TO command still using the localhostname.
This is as far as I could get and I am now really running out of ideas.
I ran my test as a non-root user, so this is not the problem.
If anyone has had a similar experience, please do not hesitate to share your knowledge.
- 04-07-2009 #2
- Join Date
- Mar 2007
Here is a quick update to let people potentially in the same situation know how things turned out for me.
After some more playing around with the hostnames and other environment variables, I ended up finding out that there were a /usr/sbin/sendmail.postfix executable.
Postfix being running perfectly, I replaced /usr/sbin/sendmail by this executable, and it now works like a charm (since /usr/mail and procmail both use this command).
I guess the sendmail.sendmail is half way relying on the background sendmail service and that once it is off you have to give up on any extra functionality.
Anyways, now things work and I will go sendmail free for a good while.