Postfix/Amavisd/Clamd – Mail Send Failing

Home » CentOS » Postfix/Amavisd/Clamd – Mail Send Failing
CentOS 8 Comments

Dear All With help from you all I am now at better stage. Special thanks to Robert.

Atleast I am able to run all the required services (postfix, amavisd, clamd etc).

I sent a mail from my gmail, I received at my newly setup domain/mailbox.

I am facing issue while sending the mail outside.

*1. Virus scan failed. The error log is as below *

*Mar 14 18:49:55 ip-173-201-189-43 amavis[3325]: (03325-01) (!)run_av
(ClamAV-clamd) FAILED – unexpected , output=”/var/spool/amavisd/tmp/amavis-20130314T184955-03325-nFS5UJ4F/parts:
lstat() failed: Permission denied. ERROR\n”
Mar 14 18:49:55 ip-173-201-189-43 amavis[3325]: (03325-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x19c3ec0) unexpected , output=”/var/spool/amavisd/tmp/amavis-20130314T184955-03325-nFS5UJ4F/parts:
lstat() failed: Permission denied. ERROR\n” at (eval 113) line 897. Mar 14 18:49:55 ip-173-201-189-43 amavis[3325]: (03325-01) (!)WARN: all primary virus scanners failed, considering backups
*

*2. Looks destination network not reachable (probably here gmail’s mail server)*
*
Mar 14 18:49:58 ip-173-201-189-43 amavis[3325]: (03325-01) FWD from < bhanu@netcloudjobs.com> -> ,BODY{IT 250 2.0.0
from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1AE0E38A0D3E
Mar 14 18:49:58 ip-173-201-189-43 postfix/error[3384]: 1AE0E38A0D3E: to=< austin.einter@gmail.com>, relay=none, delay=0.02, delays=0.01/0.01/0/0, dsn=4.4.1, status

8 thoughts on - Postfix/Amavisd/Clamd – Mail Send Failing

  • I hope I have solved the first issue by giving right permission to
    /var/spool/amavisd/tmp. I gave the permission to that folder as 770.

    Any input for 2nd issue.., Can it be a firewall issue…., do I need to open any port in IN or OUT interfaces…

    It is strange when it logs “*very temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4002:c04::1a]:25: Network is unreachable*”.

    It is just some network/dns setting causing the issue, not able to catch the issue here .., any input…

    -Austin

  • I just executed below command

    *[root@ip-173-201-189-43 tmp]#
    [root@ip-173-201-189-43 tmp]# telnet gmail-smtp-in.l.google.com 25
    Trying 173.194.79.27… telnet: connect to address 173.194.79.27: No route to host Trying 2607:f8b0:400e:c01::1b… telnet: connect to address 2607:f8b0:400e:c01::1b: Network is unreachable
    [root@ip-173-201-189-43 tmp]#
    *
    Looks its a generic issue, nothing to do with mail setup.

    I am not able to connect to gmail server’s 25 port.

    What is the work around here, any idea…..

  • I just checked firewall. tcp/smtp(25 ) is allowed.

    Any kind of DNS configuration issues….

    Any pointers …..

  • Some ISP’s block port 25 if it is a ‘home’ type connection. Comcast recently started blocking and I can’t connect there from home either.

  • configure your mail server to use your ISP’s mail server as a
    ‘smarthost’, OR configure it to use an external (coloc or whatever)
    server as smarthost via port 587 with authentication.

  • Thanks John By the way I checked with my service provider. Their ISP does not block 25. But to successfully deliver SMTP mail, I need to use their relay server (it uses port 25 only).

    Where will I configure their relay server . Is it in
    /etc/postfix/main.cfor any other file. Do I need to modify anyting in dovecot or amavisd configuration???

    Thanks Austin

  • Thanks Everybody I configured the relayhost entry in main.cf in /etc/postfix path as relayhost = [my service provider relay host]
    Thats all, I am able to send / recv email.

    Next how do I make sure, my spam/antivirus filtering is working properly…. Is it that only maillog i cam check, or is there any effective way of checking it.

    Thanks
    -Austin

LEAVE A COMMENT