Answer the question
In order to leave comments, you need to log in
Sendmail: how to set up sending from the right IP and domain?
Input:
Ubuntu 12.04 LTS
sendmail 8.14.4-2ubuntu2
cat /etc/hosts:
# IPv4
127.0.0.1 localhost
ip01 domen01.tld myserver
ip02 domen02.tld
Answer the question
In order to leave comments, you need to log in
outgoing ip for sendmyl is
CLIENT_OPTIONS(`Name=IPv4, Family=inet,Addr=reality')
and by domain read about the word masquerading. I didn’t read it - because it suits me how it sends with `hostname` (the first one in your version).
Can you show the CMS code responsible for sending email? In my opinion, it is easier to specify in the CMS which email to use when sending explicitly ([email protected]) and sendmail will chew it normally.
In general, sendmail does not know how to change ip and domains natively, and the domain from which the letter comes must be entered manually in the from field, and the IP address can be changed either using a paid module or using iptables.
The surest way for you is to simply change the ip in the network settings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question