exim4 to relay emails
- by Matthieu
I have exim4 installed on a Linux box. The basics work fine and I can send email from that machine without any problem to whatever email address.
I also have a printer/scanner which is capable to send scans as emails. It needs an SMTP gateway to be able to do that. So I give the IP address of that Linux box, changed the configuration a little bit but still cannot get it to work.
After I run dpkg-reconfigure exim4-config, here is what I get in /etc/exim4/update-exim4.conf.conf :
dc_eximconfig_configtype='internet'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1;192.168.2.2'
dc_readhost=''
dc_relay_domains='mycompanyemail.com'
dc_minimaldns='false'
dc_relay_nets='192.168.2.0/24'
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'
My problem is that with this configuration, I can only send to emails @mycompanyemail.com... It says I can use wildcard, but when I do that, the '*' is replaced by whatever filename is in the directory where I run all that.
How can I configure it to be able to send emails with any domain ? Or am I doing it wrong ?
EDIT : here is the part of the log that's causing trouble :
2011-08-03 16:28:18 H=(NPI2D389C) [192.168.2.20] F=<[email protected]> rejected RCPT <[email protected]>: relay not permitted
The first part ([email protected]) does not matter. I changed the email address. The point is that if this email is @mycompanyemail.com then everything works fine. Anything else does not work. I could add gmail.com, but I am looking to have any domain working...