can send mail but can't receive mail on roundcube with ispconfig 3 on ubuntu 16.04

Discussion in 'Installation/Configuration' started by osas Oribhabor, Jun 26, 2018.

  1. osas Oribhabor

    osas Oribhabor New Member

    hello.. i can send mail perfectly but cant receive mails except internal server.. main while in my postfix configuration, inet_interfaces=all.

    this is the output of
    netstat -ntap

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 142.44.247.148:53 0.0.0.0:* LISTEN 1294/named
    tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1294/named
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1305/sshd
    tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 11446/master
    tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1294/named
    tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 1353/dovecot
    tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 1353/dovecot
    tcp 0 0 127.0.0.1:10023 0.0.0.0:* LISTEN 1740/postgrey.pid -
    tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 8133/amavisd-new (m
    tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 11446/master
    tcp 0 0 127.0.0.1:10027 0.0.0.0:* LISTEN 11446/master
    tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 11446/master
    tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 1407/redis-server 1
    tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 1313/memcached
    tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 1353/dovecot
    tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 1353/dovecot
    tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 11446/master
    tcp 0 0 142.44.247.148:22 41.190.3.194:62706 ESTABLISHED 13016/sshd: [email protected]
    tcp 0 0 127.0.0.1:32848 127.0.0.1:143 TIME_WAIT -
    tcp 0 0 127.0.0.1:32850 127.0.0.1:143 TIME_WAIT -
    tcp 0 0 142.44.247.148:22 41.190.3.194:62305 ESTABLISHED 11233/0
    tcp 0 0 142.44.247.148:22 41.190.3.194:62253 ESTABLISHED 10600/sshd: [email protected]
    tcp 0 332 142.44.247.148:22 41.190.3.194:62763 ESTABLISHED 15456/1
    tcp 0 0 127.0.0.1:42556 127.0.0.1:3306 ESTABLISHED 15423/smtp
    tcp 0 0 127.0.0.1:42550 127.0.0.1:3306 ESTABLISHED 15422/smtp
    tcp6 0 0 :::53 :::* LISTEN 1294/named
    tcp6 0 0 :::22 :::* LISTEN 1305/sshd
    tcp6 0 0 :::25 :::* LISTEN 11446/master
    tcp6 0 0 ::1:953 :::* LISTEN 1294/named
    tcp6 0 0 :::443 :::* LISTEN 5175/apache2
    tcp6 0 0 :::993 :::* LISTEN 1353/dovecot
    tcp6 0 0 :::995 :::* LISTEN 1353/dovecot
    tcp6 0 0 ::1:10024 :::* LISTEN 8133/amavisd-new (m
    tcp6 0 0 :::3306 :::* LISTEN 1738/mysqld
    tcp6 0 0 :::587 :::* LISTEN 11446/master
    tcp6 0 0 :::110 :::* LISTEN 1353/dovecot
    tcp6 0 0 :::143 :::* LISTEN 1353/dovecot
    tcp6 0 0 :::8080 :::* LISTEN 5175/apache2
    tcp6 0 0 :::80 :::* LISTEN 5175/apache2
    tcp6 0 0 :::465 :::* LISTEN 11446/master
    tcp6 0 0 :::8081 :::* LISTEN 5175/apache2
    tcp6 0 0 127.0.0.1:3306 127.0.0.1:42550 ESTABLISHED 1738/mysqld
    tcp6 0 0 142.44.247.148:443 41.190.3.194:27895 SYN_RECV -
    tcp6 0 0 142.44.247.148:443 41.190.3.194:27894 FIN_WAIT2 17064/apache2
    tcp6 0 0 127.0.0.1:3306 127.0.0.1:42556 ESTABLISHED 1738/mysqld

    and output of
    ps aux | grep -E '(amavis|clam)'

    clamav 1325 0.0 0.4 132208 8616 ? Ss Jun23 0:26 /usr/bin/freshclam -d --foreground=true
    clamav 1364 0.0 27.6 795584 553476 ? Ssl Jun23 1:54 /usr/sbin/clamd --foreground=true
    amavis 8133 0.0 3.0 163384 60692 ? Ss Jun24 0:02 /usr/sbin/amavisd-new (master)
    amavis 8137 0.0 3.0 165040 61480 ? S Jun24 0:00 /usr/sbin/amavisd-new (ch4-avail)
    amavis 8138 0.0 3.0 165040 61480 ? S Jun24 0:00 /usr/sbin/amavisd-new (ch4-avail)
    root 16046 0.0 0.0 130284 944 pts/2 S+ 19:01 0:00 grep --color=auto -E (amavis|clam)
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is this a new installed system? Have you checked twice you have installed the required packages and done the setups as the perfect server howto instructs?
    How do you check the server can not receive e-mails?
    Does the e-mail domain have MX record in name service so senders know to send e-mails to your server?
     
  3. osas Oribhabor

    osas Oribhabor New Member

    thanks for your promt reply..
    yes its a newly installed system, i checked the server cant receive mails by sending mails to and fro my gmail account to my server emails.. my gmail receives the mails and sends them without any error messages, but my server emails ([email protected] .com) can only send but will not receive.. i actually haves two domains on the serve, both domains can receive and send mails with each other without errors ([email protected] .com sends and receives from [email protected] .com).

    yes i have an mx record set.. at first i actually installed vesta cp on my server and the server emails where working correctly using roundcube.

    i also think all packages where installed correctly.. i followed a tutorial to the last while installing ispconfig 3 on my ubuntu 16.04 server the tutorial also covers roundcube installation/setup including installation of postfix.
    could you please help me with the howto tutorial on how to correctly install roundcube on ispconfig 3 on ubuntu 16.04?
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Fix first the receiving of e-mails. Then it is time to worry about roundcube.
    Write this in a command window and keep it running while sending e-mails from GMail (or some other place):
    Code:
    tail -f /var/log/mail.log 
    Do the e-mails appear going in or out in that listing?
    If you previously could receive e-mails with that vesta thing, can it be assumed firewall is not blocking e-mails or your ISP preventing e-mails from arriving?
     
  5. osas Oribhabor

    osas Oribhabor New Member

    here is the result from keeping the code running while trying to send and receive emails from Gmail.
    tail -f /var/log/mail.log

    Jun 26 10:10:02 vps187279 postfix/smtpd[21421]: connect from localhost[127.0.0.1]
    Jun 26 10:10:02 vps187279 dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<5X7fDYxvCJR/AAAB>
    Jun 26 10:10:02 vps187279 postfix/smtpd[21421]: lost connection after CONNECT from localhost[127.0.0.1]
    Jun 26 10:10:02 vps187279 postfix/smtpd[21421]: disconnect from localhost[127.0.0.1] commands=0/0
    Jun 26 10:10:32 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21426, secured, session=</uurD4xvDJR/AAAB>
    Jun 26 10:10:32 vps187279 dovecot: imap([email protected]): Logged out in=312 out=1837
    Jun 26 10:10:44 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21428, secured, session=<IrJhEIxvDpR/AAAB>
    Jun 26 10:10:44 vps187279 dovecot: imap([email protected]): Logged out in=312 out=1837
    Jun 26 10:10:55 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21430, secured, session=<pRMJEYxvEJR/AAAB>
    Jun 26 10:10:55 vps187279 dovecot: imap([email protected]): Logged out in=90 out=880
    Jun 26 10:11:32 vps187279 postfix/scache[21330]: statistics: start interval Jun 26 10:09:40
    Jun 26 10:11:32 vps187279 postfix/scache[21330]: statistics: domain lookup hits=0 miss=3 success=0%
    Jun 26 10:11:41 vps187279 postfix/smtpd[21421]: connect from unknown[210.245.34.242]
    Jun 26 10:11:42 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21451, secured, session=<cRHYE4xvEpR/AAAB>
    Jun 26 10:11:42 vps187279 dovecot: imap([email protected]): Logged out in=32 out=464
    Jun 26 10:11:42 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21453, secured, session=<027dE4xvFJR/AAAB>
    Jun 26 10:11:42 vps187279 dovecot: imap([email protected]): Logged out in=44 out=571
    Jun 26 10:11:44 vps187279 postfix/smtpd[21421]: warning: unknown[210.245.34.242]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
    Jun 26 10:11:44 vps187279 postfix/smtpd[21421]: disconnect from unknown[210.245.34.242] helo=1 auth=0/1 quit=1 commands=2/3
    Jun 26 10:12:13 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21482, secured, session=<8kKuFYxvFpR/AAAB>
    Jun 26 10:12:13 vps187279 postfix/pickup[21324]: 62D367E7C3: uid=33 from=<[email protected]>
    Jun 26 10:12:13 vps187279 postfix/cleanup[21479]: 62D367E7C3: message-id=<[email protected]>
    Jun 26 10:12:13 vps187279 postfix/qmgr[21325]: 62D367E7C3: from=<[email protected]>, size=537, nrcpt=1 (queue active)
    Jun 26 10:12:13 vps187279 dovecot: imap([email protected]): Logged out in=468 out=619
    Jun 26 10:12:13 vps187279 postfix/smtpd[21486]: connect from localhost[127.0.0.1]
    Jun 26 10:12:13 vps187279 postfix/smtpd[21486]: 885367E7EC: client=localhost[127.0.0.1]
    Jun 26 10:12:13 vps187279 postfix/cleanup[21479]: 885367E7EC: message-id=<[email protected]>
    Jun 26 10:12:13 vps187279 postfix/qmgr[21325]: 885367E7EC: from=<[email protected]>, size=950, nrcpt=1 (queue active)
    Jun 26 10:12:13 vps187279 postfix/smtpd[21486]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
    Jun 26 10:12:13 vps187279 amavis[8137]: (08137-06) Passed CLEAN {RelayedOpenRelay}, [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: gWVDg-YI0Wlq, Hits: -, size: 537, queued_as: 885367E7EC, 144 ms
    Jun 26 10:12:13 vps187279 postfix/smtp[21484]: 62D367E7C3: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.21, delays=0.05/0.01/0.01/0.14, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 885367E7EC)
    Jun 26 10:12:13 vps187279 postfix/qmgr[21325]: 62D367E7C3: removed
    Jun 26 10:12:13 vps187279 postfix/smtp[21487]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c01::1a]:25: Network is unreachable
    Jun 26 10:12:14 vps187279 postfix/smtp[21487]: 885367E7EC: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[209.85.144.27]:25, delay=0.75, delays=0.01/0.03/0.45/0.26, dsn=2.0.0, status=sent (250 2.0.0 OK 1530022334 w13-v6si1462587qvi.32 - gsmtp)
    Jun 26 10:12:14 vps187279 postfix/qmgr[21325]: 885367E7EC: removed
    Jun 26 10:12:14 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21489, secured, session=<T3W9FYxvKpR/AAAB>
    Jun 26 10:12:14 vps187279 dovecot: imap([email protected]): Logged out in=70 out=612
    Jun 26 10:12:15 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21491, secured, session=<ulrHFYxvLJR/AAAB>
    Jun 26 10:12:15 vps187279 dovecot: imap([email protected]): Logged out in=318 out=2394
    Jun 26 10:12:15 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21493, secured, session=<0/HLFYxvLpR/AAAB>
    Jun 26 10:12:15 vps187279 dovecot: imap([email protected]): Logged out in=120 out=745
    Jun 26 10:12:24 vps187279 postfix/smtpd[21421]: connect from mail-vk0-f43.google.com[209.85.213.43]
    Jun 26 10:12:24 vps187279 postfix/smtpd[21421]: NOQUEUE: filter: RCPT from mail-vk0-f43.google.com[209.85.213.43]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10024; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vk0-f43.google.com>
    Jun 26 10:12:24 vps187279 postfix/smtpd[21421]: NOQUEUE: filter: RCPT from mail-vk0-f43.google.com[209.85.213.43]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vk0-f43.google.com>
    Jun 26 10:12:24 vps187279 policyd-spf[21496]: None; identity=helo; client-ip=209.85.213.43; helo=mail-vk0-f43.google.com; [email protected]; [email protected]
    Jun 26 10:12:24 vps187279 policyd-spf[21496]: Pass; identity=mailfrom; client-ip=209.85.213.43; helo=mail-vk0-f43.google.com; [email protected]; [email protected]
    Jun 26 10:12:25 vps187279 postfix/smtpd[21421]: 0C6B27E794: client=mail-vk0-f43.google.com[209.85.213.43]
    Jun 26 10:12:25 vps187279 postfix/cleanup[21479]: 0C6B27E794: message-id=<[email protected]om>
    Jun 26 10:12:25 vps187279 postfix/qmgr[21325]: 0C6B27E794: from=<[email protected]>, size=2800, nrcpt=1 (queue active)
    Jun 26 10:12:25 vps187279 postfix/error[21499]: 0C6B27E794: to=<[email protected]>, relay=none, delay=0.4, delays=0.38/0.01/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)
    Jun 26 10:12:25 vps187279 postfix/smtpd[21421]: disconnect from mail-vk0-f43.google.com[209.85.213.43] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
    Jun 26 10:13:11 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21522, secured, session=<kCUeGYxvPJR/AAAB>
    Jun 26 10:13:11 vps187279 dovecot: imap([email protected]): Logged out in=315 out=3016
    Jun 26 10:13:15 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21524, secured, session=<I7ZbGYxvPpR/AAAB>
    Jun 26 10:13:15 vps187279 dovecot: imap([email protected]): Logged out in=166 out=1402
    Jun 26 10:13:16 vps187279 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21526, secured, session=<DQ9tGYxvQJR/AAAB>
    Jun 26 10:13:16 vps187279 dovecot: imap([email protected]): Logged out in=318 out=2394
     
    Last edited: Jun 27, 2018
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Do the e-mails appear going in or out in that listing?
     
  7. osas Oribhabor

    osas Oribhabor New Member

    i actually dont fully understand what listing you are referring to... but on Gmail i receive the email immediately and wen i send back to my sever the mail appears to have been sent without any error... also on my sever the sent email appears but the inbox remains empty...
    i hope i was able to answer your question properly...
    thanks for your prompt response.. much appreciated.
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So the mail you send from GMail does arrive to your mail server? That would mean receiving e-mails is working OK.

    How are you reading e-mails if the received email is missing?
    Check what is in the maildir, I guess the files are in
    Code:
    /var/vmail/<maildomainname>/
     
  9. osas Oribhabor

    osas Oribhabor New Member

    i have checked the /var/vmail/<maildomainname>/maildir /cur the mail from gmail didnt make it there just the ispconfig welcome email.
    i noticed there was no .Inbox directory the cur, new and tmp directory where in the root of maildir. there was .junk, .sent .trash and .draft could this be the reason the mail are not making it to the inbox?
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That may be the clue, if 0C6B27E794 is the test message you sent. But I do not know why connection is refused. You migth want to check postfix setup once more, or wait for expert advice.
    That mail should be in suspend queue now. You can read it with postcat. There should be a file named 0C6B27E794.
     
  11. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    It looks like your amavis is not listening on port 10026, that is why the connection refused.
    what is the output of
    Code:
    cat /etc/amavis/conf.d/50-user | egrep 10026
     
  12. osas Oribhabor

    osas Oribhabor New Member

    there was no output for the command.
     
  13. osas Oribhabor

    osas Oribhabor New Member

    i was able to read the mails in queue using the
    Code:
    postcat -q  <mail  unique id>   
    look like all the mails is deferred, and moved to deferred queue.

    this is the output of
    Code:
    qshape deferred
    T 5 10 20 40 80 160 320 640 1280 1280+
    TOTAL 56 0 0 2 0 0 1 5 12 3 33
    ccd-models.co.uk 44 0 0 1 0 0 1 3 8 3 28
    o2developer.com 12 0 0 1 0 0 0 2 4 0 5
     
    Last edited: Jun 26, 2018
  14. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    Hmm.. can be config files on ubuntu bit different although i doubt it... what files are located in /etc/amavis/conf.d ?
    Most likely you will see the 50-user, can you post the entire output of that file here?

    Yes all your inbound mail will get deferred because amavis is not listening on that specific port and therefore postfix just won't be able to get the mail ultimately delivered to dovecot (through amavis).
    The deferring just means it will be kept in queue until it actually can deliver it, postfix by default will keep trying every 5 minutes, but once you know amavis is listening on port 10026 you can also force postfix to deliver the deferred mails.
     
    Last edited: Jun 26, 2018
  15. osas Oribhabor

    osas Oribhabor New Member

    60-dkim
    50-user
    05-node_id
    25-amavis_helpers
    21-ubuntu_defaults
    05-domain_id
    15-content_filter_mode
    40-policy_banks
    01-debian
    30-template_localization
    20-debian_defaults
    15-av_scanners
     
  16. osas Oribhabor

    osas Oribhabor New Member

    below is the content of /etc/amavis/conf.d/50-user
    Code:
    use strict;
    
    #
    
    # Place your configuration directives here. They will override those in
    # earlier files.
    
    #
    
    # See /usr/share/doc/amavisd-new/ for documentation and examples of
    # the directives you can use in this file
    
    #
    
    #------------ Do not modify anything below this line -------------
    
    1; # ensure a defined return
     
    Last edited: Jun 27, 2018
  17. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    wow.. something either went very wrong with installing amavis or the configuration is completely different on ubuntu 16.04 (however i doubt that).
    That specific file should be full with directives. I'm not sure wether it's amavis that fills it or if that is done from ispconfig setup.

    For comparison this is what mines look like:
    Code:
    use strict;
    
    #
    # Place your configuration directives here.  They will override those in
    # earlier files.
    #
    # See /usr/share/doc/amavisd-new/ for documentation and examples of
    # the directives you can use in this file
    #
    
    @bypass_virus_checks_maps = (
       \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
    
    @bypass_spam_checks_maps = (
       \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
    
    #
    # Database connection settings
    #
    
    @lookup_sql_dsn =
       ( ['DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306', 'ispconfig', '#######PASSWORD#######'] );
    
    # @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
    #$sql_select_policy = 'SELECT "Y" as local FROM mail_domain WHERE CONCAT("@",domain) IN (%k)';
    # $banned_files_quarantine_method = 'sql';
    # $spam_quarantine_method         = 'sql';
    
    #
    # SQL Select statements
    #
    
    $sql_select_policy =
       'SELECT *,spamfilter_users.id'.
       ' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
       ' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';
    
    
    $sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
        ' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k)) AND (spamfilter_wblist.active="y")' .
        ' ORDER BY spamfilter_wblist.priority DESC';
    
    #
    # Quarantine settings
    #
    
    $final_virus_destiny = D_BOUNCE;
    $final_spam_destiny = D_DISCARD;
    $final_banned_destiny = D_BOUNCE;
    $final_bad_header_destiny = D_PASS;
    
    # Default settings, we st this very high to not filter aut emails accidently
    $sa_spam_subject_tag = '***SPAM*** ';
    $sa_tag_level_deflt  = 20.0;  # add spam info headers if at, or above that level
    $sa_tag2_level_deflt = 60.0; # add 'spam detected' headers at that level
    $sa_kill_level_deflt = 60.0; # triggers spam evasive actions
    $sa_dsn_cutoff_level = 100;   # spam level beyond which a DSN is not sent
    
    #
    # Disable spam and virus notifications for the admin user.
    # Can be overridden by the policies in mysql
    #
    
    $virus_admin = undef;
    $spam_admin = undef;
    
    
    #
    # Enable Logging
    #
    
    $DO_SYSLOG = 1;
    $LOGFILE = "/var/log/amavis.log";  # (defaults to empty, no log)
    
    # Set the log_level to 5 for debugging
    $log_level = 0;                # (defaults to 0)
    
    $inet_socket_port = [10024,10026];
    
    # :* = send to incoming Port + 1
    $forward_method = 'smtp:127.0.0.1:*';
    $notify_method = 'smtp:127.0.0.1:*';
    $interface_policy{'10026'} = 'ORIGINATING';
    $policy_bank{'ORIGINATING'} = {
      originating => 1,
      smtpd_discard_ehlo_keywords => ['8BITMIME'],
    };
    
    # IP-Addresses for internal networks => load policy MYNETS
    # - requires -o smtp_send_xforward_command=yes in postfix master.cf
    @mynetworks = qw(0.0.0.0/8 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 [::1] [FE80::]/10 [FEC0::]/10);
    
    # Allow SMTP access from IPs in @inet_acl to amvisd SMTP Port
    @inet_acl = qw( 127.0.0.1 [::1] 192.168.0.0/16 );
    
    # DKIM
    $enable_dkim_verification = 1;
    $enable_dkim_signing = 1; # load DKIM signing code
    $signed_header_fields{'received'} = 0;  # turn off signing of Received
    @dkim_signature_options_bysender_maps = (
    { '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );
    
    #------------ Do not modify anything below this line -------------
    1;  # insure a defined return
    As you can see there is something in there that is ispconfig specific (i commented out my password obviously) so it could very well be that ispconfig setup fills this file with all the necesarry directives.

    Just for completeness, can you show the output of:
    Code:
    ls -l /etc/amavis/conf.d
    So i can say, based by the size of the files if you might be missing more or not.
     
  18. osas Oribhabor

    osas Oribhabor New Member

    the output of the code
    Code:
    ls -l /etc/amavis/conf.d
    Code:
    total 76
    -rw-r--r-- 1 root root  1610 Feb 18  2016 01-debian
    -rw-r--r-- 1 root root   692 Feb 18  2016 05-domain_id
    -rw-r--r-- 1 root root   429 Feb 18  2016 05-node_id
    -rw-r--r-- 1 root root 20691 Feb 18  2016 15-av_scanners
    -rw-r--r-- 1 root root   717 Feb 18  2016 15-content_filter_mode
    -rw-r--r-- 1 root root  9560 Jun 22 20:51 20-debian_defaults
    -rw-r--r-- 1 root root   649 Feb 18  2016 21-ubuntu_defaults
    -rw-r--r-- 1 root root   573 Feb 18  2016 25-amavis_helpers
    -rw-r--r-- 1 root root  2130 Feb 18  2016 30-template_localization
    -rw-r--r-- 1 root root  1567 Feb 18  2016 40-policy_banks
    -rw-r----- 1 root root   318 Feb 18  2016 50-user
    -rw-r--r-- 1 root root    89 Jun 24 00:07 60-dkim
     
  19. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    rest seems complete, except for the 50-user and the 60-dkim but i think the latter is only filled from ISPConfig itself the moment you turn on DKIM on a maildomain.
    The weird thing is you don't seem to have any other problems with postfix or with dovecot, so somehow it looks like the ISPconfig setup ran just not completely missing out on the amavis configuration.

    You can try to copy the entire text i posted into you 50-user file, and set the correct password for the dbispconfig obviously (check /etc/postfix/mysql-virtual_client.cf, it should mention the user ispconfig with the correct password.
    Save it and restart amavis
    Code:
    systemctl restart amavis
    I don't see anything else in that config file that is server specific and needs to be changed for your server, so i think you should be good.
     
  20. osas Oribhabor

    osas Oribhabor New Member

    i have copied your 50-user file and changed the password to mine and restarted amavis. still i cant receive mails.
     

Share This Page