0

am using exim4 mail server on my vps running debian 8.9 , problem is i can get email but cant send mails , so when i send mail from roundcube to gmail i get error

SMTP Error (550): Failed to set sender (Access denied - Invalid HELO name (See RFC2821 4.1.3)).

so i check exim4 template and debug it and found that $sender_helo_name is set to my server ip address. so i was wondering how to set $sender_helo_name value to my site domain

update exim main log :

2017-09-28 09:33:56 H=localhost (198.50.220.183) [127.0.0.1] rejected MAIL <contactus@useotools.com>: Access denied - Invalid HELO name ( 198.50.220.183) (See RFC2821 4.1.3)
2017-09-28 09:36:23 no host name found for IP address 123.56.151.114
2017-09-28 09:36:24 no host name found for IP address 123.56.151.114
2017-09-28 09:39:01 1dxQbF-0003dy-6j <= root@useotools.com U=root P=local S=1044
2017-09-28 09:39:01 1dxQbF-0003dy-6j => root <root@useotools.com> R=localuser T=local_delivery
2017-09-28 09:39:01 1dxQbF-0003dy-6j Completed
2017-09-28 09:43:17 no IP address found for host 207-101-169-181.fibertel.com.ar (during SMTP connection from [181.169.101.207])
2017-09-28 09:43:18 no IP address found for host 207-101-169-181.fibertel.com.ar (during SMTP connection from [181.169.101.207])
2017-09-28 09:46:36 no IP address found for host ip-187.94.111-100.globalwave.com.br (during SMTP connection from [187.94.111.100])
2017-09-28 09:46:37 no IP address found for host ip-187.94.111-100.globalwave.com.br (during SMTP connection from [187.94.111.100])
2017-09-28 09:53:15 no host name found for IP address 41.191.224.5
2017-09-28 09:53:16 no host name found for IP address 41.191.224.5
2017-09-28 09:54:23 exim 4.84_2 daemon started: pid=15145, -q30m, listening for SMTP on port 25 (IPv4) port 587 (IPv4) port 2525 (IPv4) and for SMTPS on port 465 (IPv4)
  • Question: In your log, it says no host name for 123.56.151.114. Is this your IP address or one of your clients? – Chmmr Oct 5 '17 at 10:46
3

Define the macro MAIN_HARDCODE_PRIMARY_HOSTNAME and set it to the desired name. Typically this would be something like mail.example.com or smtp.example.com. If you are using split configuration, use a file in /etc/exim4/conf.d/main. Otherwise, use /etc/exim4/exim4.conf.localmacros.

The 550 error is being sent by the receiving server to indicate your HELO name is invalid. It should be set to the same value as the PTR record for your servers IP address. To set the PTR record you need a static IP address and the co-operation of your provider. You also need a corresponding A record for the name of your mail server. This will enable rDNS validation of the name. Your MX record should point to this name.

Also look at setting up an SPF record for your mail server and your domain.

Using your VPS provider's relay server may be a simpler solution. Use a smarthost configuration with local mail. Configure the relay server as the smarthost server. Modify your SPF record to indicate that the relay server can send mail for your domain.

  • ya i set macro MAIN_HARDCODE_PRIMARY_HOSTNAME in /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs also spf records are set in my vesta cp , however i added it for mail domain when i debug $sender_helo_name is still server ip – user889030 Sep 28 '17 at 5:09
  • i haved exim mail log – user889030 Sep 28 '17 at 5:17
  • i have set hostname in /etc/sysctl.conf kernel.hostname = useotools.com kernel.domainname = useotools.com but still no luck :( i wonder why exim is setting server ip for heloname – user889030 Sep 28 '17 at 5:45
  • @user889030 You need to configure exim not the kernel. It common for a mail server to present a different name than the host it runs on. Check DNS as well. It would be much easier to assist you if you provided your mail server's domain name. You will need to restart exim after altering the configuration. – BillThor Sep 29 '17 at 3:21
  • my mail server is : mail.useotools.com ... incoming mails are ok , just that outgoing mail issue , with helo name – user889030 Sep 29 '17 at 14:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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