Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 :


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) [] F=<scanner@company.cal> rejected RCPT <m......j.....@gmail.com>: relay not permitted

The first part (scanner@company.cal) 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...

share|improve this question
What do your logs say? –  womble Aug 4 '11 at 0:44
As @womble said, check your logs (use the exigrep command to filter unneeded noise) for errors. Could easily be some incorrect HELO/EHLO from the printer or some malformed recipient address. –  Mr Shunz Aug 4 '11 at 13:02
add comment

2 Answers

You are using "dc_relay_domains='mycompanyemail.com'" and this is the reason why you are able to send mails only to your company mail addresses. This parameter need to be configured only if you need to restrict email delivery and you need to leave it empty to fix your issue.

Actually, the dc_relay_nets is the parameter, that restricts the relay IPs.


share|improve this answer
I tried to leave that dc_relay_domains empty or use and asterisk but none worked (the latter replaced the asterisk with file names...) –  Matthieu Aug 5 '11 at 1:07
Could you try to set that to gmail.com and see what happens ? –  SparX Aug 5 '11 at 2:31
add comment

Set dc_relay_domains='' rather than setting it to *. Trust in the dc_relay_nets to limit use of the server to local servers.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.