0

I have a server which is reachable under the domain mydomain.com. The mailserver for this domain (sending and receiving) is mail.provider.com. As I have to send a newsletter from my site and the provider doesn't allow to use his mailserver for newsletters, the provider authorized my server to send mails (SPF entry).

So I configured Exim4 to accept connections only from localhost. To get a correct "EHLO mydomain.com" I have to change /etc/hosts and /etc/hostname so that my server has the hostname mydomain.com

With this configuration I can send mails to all big mail providers without problems. However, I'm not able to send mails from the server to any @mydomain.com addresses.

Mainlog says:

2011-09-10 16:33:41 1R2Ocn-0001Ba-QD <= [email protected] U=user P=local S=991
2011-09-10 16:33:41 1R2Ocn-0001Ba-QD ** [email protected]: Unrouteable address
2011-09-10 16:33:41 1R2Ocn-0001Bc-Qr <= <> R=1R2Ocn-0001Ba-QD U=Debian-exim P=local S=1758
2011-09-10 16:33:41 1R2Ocn-0001Bc-Qr ** [email protected]: Unrouteable address
2011-09-10 16:33:41 1R2Ocn-0001Bc-Qr Frozen (delivery error message)
2011-09-10 16:33:41 1R2Ocn-0001Ba-QD Completed

So changing /etc/hosts and /etc/hostname seems not to be the right solution here.

I think best solution would be to hardcode the EHLO data in /etc/exim4/exim4.conf.template Tried this already with the following lines:

REMOTE_SMTP_HELO_DATA=mydomain.com

=> "EHLO vadmin123" instead of "EHLO mydomain.com"

PRIMARY_HOST_NAME = mydomain.com
MAIN_HARDCODE_PRIMARY_HOSTNAME = mydomain.com

=> "EHLO vadmin123" instead of "EHLO mydomain.com"

What did I miss?

2
  • So problem solved, right?
    – mailq
    Sep 10, 2011 at 16:16
  • Yes. Is there any way to mark this questione as solved?
    – patrick
    Sep 11, 2011 at 17:22

1 Answer 1

-1

I don't understand why, but when I change

remote_smtp:
  debug_print = "T: remote_smtp for $local_part@$domain"
  driver = smtp
  .ifdef REMOTE_SMTP_HOSTS_AVOID_TLS
    hosts_avoid_tls = REMOTE_SMTP_HOSTS_AVOID_TLS
  .endif
  .ifdef REMOTE_SMTP_HEADERS_REWRITE
    headers_rewrite = REMOTE_SMTP_HEADERS_REWRITE
  .endif
  .ifdef REMOTE_SMTP_RETURN_PATH
    return_path = REMOTE_SMTP_RETURN_PATH
  .endif
  .ifdef REMOTE_SMTP_HELO_FROM_DNS
    helo_data = mydomain.ocm
  .endif

to

remote_smtp:
  debug_print = "T: remote_smtp for $local_part@$domain"
  driver = smtp
  .ifdef REMOTE_SMTP_HOSTS_AVOID_TLS
    hosts_avoid_tls = REMOTE_SMTP_HOSTS_AVOID_TLS
  .endif
  .ifdef REMOTE_SMTP_HEADERS_REWRITE
    headers_rewrite = REMOTE_SMTP_HEADERS_REWRITE
  .endif
  .ifdef REMOTE_SMTP_RETURN_PATH
    return_path = REMOTE_SMTP_RETURN_PATH
  .endif
  .ifdef REMOTE_SMTP_HELO_FROM_DNS
    helo_data = mydomain.ocm
  .endif
1
  • Both blocks seem the same. And you don't tell what happens when you change it.
    – emi
    Feb 24, 2016 at 18:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .