postfix problem

Discussion in 'ISPConfig 3 Priority Support' started by bobpit, Feb 14, 2014.

  1. bobpit

    bobpit Member

    I decided to reboot the server and suddenly posftix is not working. I have the following error messages:

    from monit.log:
    Code:
    [GMT Feb 14 01:41:16] info     : 'postfix' trying to restart
    [GMT Feb 14 01:41:16] info     : 'postfix' stop: /etc/init.d/postfix
    [GMT Feb 14 01:41:16] info     : 'postfix' start: /etc/init.d/postfix
    [GMT Feb 14 01:42:17] error    : 'postfix' failed protocol test [SMTP] at INET[localhost:25] via TCP -- SMTP: error receiving data -- Resource temporarily unavailable
    from mail.log:
    Code:
    Feb 14 01:40:15 server1 postfix/master[2547]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 14 01:41:15 server1 postfix/smtpd[2591]: connect from localhost.localdomain[127.0.0.1]
    Feb 14 01:41:15 server1 postfix/smtpd[2591]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 14 01:41:15 server1 postfix/smtpd[2591]: fatal: no SASL authentication mechanisms
    Feb 14 01:41:16 server1 postfix/master[2547]: warning: process /usr/lib/postfix/smtpd pid 2591 exit status 1
    Feb 14 01:41:16 server1 postfix/master[2547]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 14 01:41:16 server1 postfix/master[2547]: terminating on signal 15
    Feb 14 01:41:16 server1 postfix/master[2708]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 14 01:42:16 server1 postfix/smtpd[2767]: connect from localhost.localdomain[127.0.0.1]
    Feb 14 01:42:16 server1 postfix/smtpd[2767]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 14 01:42:16 server1 postfix/smtpd[2767]: fatal: no SASL authentication mechanisms
    Feb 14 01:42:17 server1 postfix/master[2708]: warning: process /usr/lib/postfix/smtpd pid 2767 exit status 1
    Feb 14 01:42:17 server1 postfix/master[2708]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 14 01:42:18 server1 postfix/master[2708]: terminating on signal 15
    Feb 14 01:42:18 server1 postfix/master[2885]: daemon started -- version 2.9.6, configuration /etc/postfix
    from mail.err:
    Code:
    Feb 14 01:24:23 server1 postfix/smtpd[2625]: fatal: no SASL authentication mechanisms
    Feb 14 01:24:44 server1 postfix/smtpd[1295]: fatal: no SASL authentication mechanisms
    Feb 14 01:25:05 server1 postfix/smtpd[1378]: fatal: no SASL authentication mechanisms
     
  2. srijan

    srijan New Member HowtoForge Supporter

    Hi Bobpit,

    You need to change your dovecot.conf (/etc/dovecot.conf or /etc/dovecot/dovecot.conf, depending on your distribution) and make sure you have the following lines in it:

    Restart Dovecot.

    It will create /var/spool/postfix/private/auth .

    Finally in /etc/postfix/main.cf you need to modify as follows
    Finally restart Postfix.

    Br//
    Srijan
     
  3. bobpit

    bobpit Member

    Hello srijan

    I did check and the entries you suggest are missing from the files.

    I am wondering, even if I do these changes and it does work. The server was working for over a month. I installed monit couple of weeks ago and after many restarts did not have this problem. Why suddenly this occured?

    There must be something else that went wrong.

    Only thing I can think off exactly a week ago I added another domain to the vps, through ispconfig3. I don't remember if I have rebooted the server after this. But ispconfig3 did restart services like nginx.

    So if this is the case, then I need to change some file that relates to the new domain. Right? But I am also wondering, why didn't ispconfig3 take care of these issues at the time I added the domain?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Which Linux distribution do you use? Do you use dovecot or courier imap?

    This cant be related, ispconfig is not able to alter these files. only the ispconfig installer can set them. So the most likely reason is that either there is another controlpanel like webmin installed which altered them or a linux system overwrote files.

    I explained that abobe. this file des not contain anything that needs to be altered when you add domains. this file is just installed one during initial server installation and does not need to be and does not get altered by ispconfig afterwards, unless you update ispconfig to a new version.

    As there might be mre files damaged on your server and the lines that srijan posted are not the only ones that are required if your config was overwritten, it is better that you let the ispconfig updater do the job to repair your server.

    run:

    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xvfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install
    php -q update.php

    and choose to reconfigure services during update.
     
  5. bobpit

    bobpit Member

    I am not sure if devcot or courier imap are active (sorry). I may have deactivated them after following some guides (even from howtoforge) on how to optimize a server, since I do not need them.

    I can say that I do not intentionally use them or have installed them. I tried google on how to verify if they are active and running:

    Does this help?
    Code:
    root@server1:~# ps auxw|grep "dovecot"
    root      3494  0.0  0.0   4336   852 pts/1    S+   09:15   0:00 grep --color=auto dovecot
    I searched in /var/log and could not find any devcot.log file.

    What I use is in my signature:
    Ubuntu 12.04 server
    Nginx 1.4.4

    AFAIK, I do not have any other control panel and certainly I do not use anything else than ispconfig3.

    I will wait for a responce, before I run the script.
     
  6. srijan

    srijan New Member HowtoForge Supporter

    Hi Bobpit,

    Did you tried the ispconfig updater??
    Please use that it will resolve your issue.

    Further reconfigure the services, it will the update all the config files which are missing in your server.

    Thanks
    Srijan
     
  7. bobpit

    bobpit Member

    Hello srijan

    As I said:
    I certainly want the problem fixed, but I do not want to bloat my server with all available services and options. It took me some time to go through guides and remove several of them, (like the antivirus).

    I am hesitant to run the script. Will it only correct postfix and nothing else?

    For example I do not know if devcot or courier imap is running, I do not know if I need them and I do not know if altering them the problem will be fixed. The vps is running 2 proxy servers and nothing else. I need postfix so that monit can email (through gmail mailserver) error messages to the sysadmin. Nothing else.

    Additionally, I remember I made changes that I know will be affected and will need to be redone after an ispconfig3 update. I just need to check again my old notes for this.
     
    Last edited: Feb 14, 2014
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. Then you should have installed ispconfig in expert mode at the beginning and choose only to configure web services and not mail services. As you configured the email services, they got all connected together any by removing a service, other services will start to fail as e.g. postfix depends on dovecot.

    so what you can do is that you try to rename the postfix main.cf and master.cf files and then run

    dpkg-reconfigure postfix

    to get a new minimal postfx config file without dependencies to dovecot.
     
  9. bobpit

    bobpit Member

    Great! This is exactly what I wanted. Will try it.
     
  10. bobpit

    bobpit Member

    I just run the postfix configuration like you said:
    dpkg-reconfigure postfix

    It still does not work. Obviously I configured it wrong, as I did not have much clue what I was doing. Here are the options I set:
    Code:
    satelite option
    system mail name:  server1.surf-anonymous.info
    SMTP relay host:  blank
    Root and postmaster mail recipient: blank
    Other destinations to accept mail for (blank for none):  server1.surf-anonymous.info, localhost, localhost.localdomain, [B]gmail.com[/B]
    Local networks:   127.0.0.0/8 [::1]/128
    Use procmail for local delivery? NO
     Local address extension character:    +

    Again, my only use right now is to get email alerts through GMAIL if something goes wrong. I don't know how ispconfig3 does it (I think I dissabled it). This is from monitrc:
    Code:
    set mailserver smtp.gmail.com port 587 username "[email protected]" password "xxxx" using tlsv1 with timeout 30 seconds
    ....
    set alert [email protected]
    .....
     check process postfix with pidfile /var/spool/postfix/pid/master.pid
       group mail
       start program = "/etc/init.d/postfix start"
       stop  program = "/etc/init.d/postfix stop"
       if failed port 25 protocol smtp then restart
    So if I run "dpkg-reconfigure postfix" again, what should I enter in the various options?
     
    Last edited: Feb 14, 2014
  11. bobpit

    bobpit Member

    from monit log:
    Code:
    [GMT Feb 14 16:56:28] info     : 'postfix' trying to restart
    [GMT Feb 14 16:56:28] info     : 'postfix' stop: /etc/init.d/postfix
    [GMT Feb 14 16:56:28] info     : 'postfix' start: /etc/init.d/postfix
    [GMT Feb 14 16:57:30] error    : 'postfix' failed protocol test [SMTP] at INET[localhost:25] via TCP -- SMTP: error receiving data -- Resource temporarily unavailable
    from mail log:
    Code:
    Feb 14 16:56:28 server1 postfix/master[7696]: terminating on signal 15
    Feb 14 16:56:29 server1 postfix/master[7861]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: 27A509DD262: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: B5C689DD259: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: 1ACB09DD263: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: 946779DD264: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: BF17D9DD260: from=<[email protected]>, size=1153, nrcpt=1 (queue active)
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: 051689DD25B: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:56:29 server1 postfix/local[7869]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: B51279DD261: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: 6009D9DD25E: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:56:29 server1 postfix/qmgr[7864]: EAEBB9DD25D: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:56:30 server1 postfix/master[7861]: warning: process /usr/lib/postfix/local pid 7869 exit status 1
    Feb 14 16:56:30 server1 postfix/master[7861]: warning: /usr/lib/postfix/local: bad command startup -- throttling
    Feb 14 16:57:29 server1 postfix/smtpd[7907]: connect from localhost.localdomain[127.0.0.1]
    Feb 14 16:57:29 server1 postfix/smtpd[7907]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 14 16:57:29 server1 postfix/smtpd[7907]: fatal: no SASL authentication mechanisms
    Feb 14 16:57:30 server1 postfix/master[7861]: warning: process /usr/lib/postfix/smtpd pid 7907 exit status 1
    Feb 14 16:57:30 server1 postfix/master[7861]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 14 16:57:30 server1 postfix/local[7911]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit
    Feb 14 16:57:30 server1 postfix/master[7861]: terminating on signal 15
    Feb 14 16:57:31 server1 postfix/master[8028]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: 27A509DD262: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: B5C689DD259: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: 1ACB09DD263: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: 946779DD264: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: BF17D9DD260: from=<[email protected]>, size=1153, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: 051689DD25B: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: B51279DD261: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: 6009D9DD25E: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/qmgr[8030]: EAEBB9DD25D: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 14 16:57:31 server1 postfix/local[8035]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit
    Feb 14 16:57:32 server1 postfix/master[8028]: warning: process /usr/lib/postfix/local pid 8035 exit status 1
    Feb 14 16:57:32 server1 postfix/master[8028]: warning: /usr/lib/postfix/local: bad command startup -- throttling
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    set mailbox size limit and message size limit in ispconfig under System > server config > email to 0 and click on save.
     
  13. bobpit

    bobpit Member

    They were already set to 0.

    I just saved it again.

    It still does not work. Monit still shows error: "connection failed to localhost:25 [SMTP via TCP]"
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    and you still get new errr lines with:

    fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit

    in /var/log/mail.log? Then check if these values are set to 0 in postfix main.cf as well.
     
  15. bobpit

    bobpit Member

    No, these are the contents of my mail.log:
    Code:
    Feb 15 08:23:02 server1 postfix/smtpd[12901]: connect from localhost.localdomain[127.0.0.1]
    Feb 15 08:23:02 server1 postfix/smtpd[12901]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 15 08:23:02 server1 postfix/smtpd[12901]: fatal: no SASL authentication mechanisms
    Feb 15 08:23:03 server1 postfix/master[12859]: warning: process /usr/lib/postfix/smtpd pid 12901 exit status 1
    Feb 15 08:23:03 server1 postfix/master[12859]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 15 08:23:03 server1 postfix/master[12859]: terminating on signal 15
    Feb 15 08:23:05 server1 postfix/master[13019]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 15 08:24:05 server1 postfix/smtpd[13061]: connect from localhost.localdomain[127.0.0.1]
    Feb 15 08:24:05 server1 postfix/smtpd[13061]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 15 08:24:05 server1 postfix/smtpd[13061]: fatal: no SASL authentication mechanisms
    Feb 15 08:24:06 server1 postfix/master[13019]: warning: process /usr/lib/postfix/smtpd pid 13061 exit status 1
    Feb 15 08:24:06 server1 postfix/master[13019]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 15 08:24:06 server1 postfix/master[13019]: terminating on signal 15
    Feb 15 08:24:06 server1 postfix/master[13178]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 15 08:25:01 server1 postfix/pickup[13180]: A11C39DC332: uid=115 from=<munin>
    Feb 15 08:25:01 server1 postfix/cleanup[13256]: A11C39DC332: message-id=<[email protected]>
    Feb 15 08:25:01 server1 postfix/qmgr[13181]: A11C39DC332: from=<[email protected]>, size=731, nrcpt=1 (queue active)
    Feb 15 08:25:01 server1 postfix/local[13265]: A11C39DC332: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.22, delays=0.19/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
    Feb 15 08:25:01 server1 postfix/qmgr[13181]: A11C39DC332: removed
    Feb 15 08:25:06 server1 postfix/smtpd[13274]: connect from localhost.localdomain[127.0.0.1]
    Feb 15 08:25:06 server1 postfix/smtpd[13274]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 15 08:25:06 server1 postfix/smtpd[13274]: fatal: no SASL authentication mechanisms
    Feb 15 08:25:07 server1 postfix/master[13178]: warning: process /usr/lib/postfix/smtpd pid 13274 exit status 1
    Feb 15 08:25:07 server1 postfix/master[13178]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 15 08:25:08 server1 postfix/master[13178]: terminating on signal 15
    Feb 15 08:25:08 server1 postfix/master[13390]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 15 08:26:08 server1 postfix/smtpd[13432]: connect from localhost.localdomain[127.0.0.1]
    Feb 15 08:26:08 server1 postfix/smtpd[13432]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 15 08:26:08 server1 postfix/smtpd[13432]: fatal: no SASL authentication mechanisms
    Feb 15 08:26:09 server1 postfix/master[13390]: warning: process /usr/lib/postfix/smtpd pid 13432 exit status 1
    Feb 15 08:26:09 server1 postfix/master[13390]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 15 08:26:09 server1 postfix/master[13390]: terminating on signal 15
    Feb 15 08:26:10 server1 postfix/master[13549]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 15 08:27:10 server1 postfix/smtpd[13613]: connect from localhost.localdomain[127.0.0.1]
    Feb 15 08:27:10 server1 postfix/smtpd[13613]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 15 08:27:10 server1 postfix/smtpd[13613]: fatal: no SASL authentication mechanisms
    Feb 15 08:27:11 server1 postfix/master[13549]: warning: process /usr/lib/postfix/smtpd pid 13613 exit status 1
    Feb 15 08:27:11 server1 postfix/master[13549]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 15 08:27:12 server1 postfix/master[13549]: terminating on signal 15
    Feb 15 08:27:12 server1 postfix/master[13733]: daemon started -- version 2.9.6, configuration /etc/postfix
    As I said in the previous post (http://www.howtoforge.com/forums/showpost.php?p=309920&postcount=10), the problem must be the almost random options I entered when I reconfigured postfix. If you could point me to a very explanatory guide on how to setup postfix, it would be a breeze to do it.
     
    Last edited: Feb 15, 2014
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so this issue is solved.

    Thats described in the perfect setup guide. The problem with your setup is now that you removed packages of your working setup and postfix depends on these packages and so you broke your mail setup.

    Please post you postfix main.cf file.
     
  17. bobpit

    bobpit Member

    I reconfigured postfix with this command
    Code:
    dpkg-reconfigure postfix
    
    And I set those options:
    1)General type of mail configuration: Satellite system
    2)System mail name: surf-anonymous.info
    3)SMTP relay host: smtp.gmail.com
    4)Root and postmaster mail recipient: blank
    5)Other destinations to accept mail for (blank for none): blank
    6)Force synchronous updates on mail queue? NO
    7)Local networks: 127.0.0.0/8 [::1]/128 (default)
    8)Use procmail for local delivery? NO
    9)Mailbox size limit (bytes): 0
    10)Ler nowocal address extension character: + (default)
    11)Internet protocols to use: all

    Detailed changes are recorded here: http://bbb-solutions.blogspot.gr/2014/02/using-gmail-with-postfix-as-smtp-relay.html

    postfix behaves MUCH better now. For example I run this test with success, postfix was able to send an email to my gmail address:
    Code:
    echo "Test mail from postfix" | mail -s "Test Postfix" [email protected]
    Here are the latest from mail.log:
    Code:
    Feb 15 19:03:33 server1 postfix/master[13865]: terminating on signal 15
    Feb 15 19:03:39 server1 postfix/master[13997]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 15 19:04:40 server1 postfix/smtpd[14016]: connect from localhost.localdomain[127.0.0.1]
    Feb 15 19:04:40 server1 postfix/smtpd[14016]: warning: SASL: Connect to private/auth failed: Connection refused
    Feb 15 19:04:40 server1 postfix/smtpd[14016]: fatal: no SASL authentication mechanisms
    Feb 15 19:04:41 server1 postfix/master[13997]: warning: process /usr/lib/postfix/smtpd pid 14016 exit status 1
    Feb 15 19:04:41 server1 postfix/master[13997]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Feb 15 19:04:42 server1 postfix/master[13997]: terminating on signal 15
    Feb 15 19:04:43 server1 postfix/master[14133]: daemon started -- version 2.9.6, configuration /etc/postfix
    Feb 15 19:05:02 server1 postfix/pickup[14135]: 844169DC352: uid=115 from=<munin>
    Feb 15 19:05:02 server1 postfix/cleanup[14179]: 844169DC352: message-id=<[email protected]>
    Feb 15 19:05:02 server1 postfix/qmgr[14136]: 844169DC352: from=<[email protected]>, size=715, nrcpt=1 (queue active)
    Here is the postfix main.cf file:
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = /usr/share/doc/postfix
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = server1.surf-anonymous.info
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    myorigin = /etc/mailname
    mydestination = 
    relayhost = smtp.gmail.com
    mynetworks = 127.0.0.0/8 [::1]/128
    mailbox_command = 
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = loopback-only
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_tls_security_level = may
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_client_message_rate_limit = 100
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = dovecot
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    owner_request_special = no
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    # content_filter = amavis:[127.0.0.1]:10024
    # receive_override_options = no_address_mappings
    message_size_limit = 0
    inet_protocols = all
    
    # BBB removed this, followed this guide: http://www.digitalfaq.com/forum/guides-ispconfig/3261-how-optimize-ispconfig.html
    #content_filter = amavis:[127.0.0.1]:10024
    #receive_override_options = no_address_mappings
    
    # BBB added those lines (guide: http://blog.bobbyallen.me/2013/12/30/using-gmail-with-postfix-as-an-smtp-relay/)
    smtp_use_tls=yes
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = noanonymous
    smtp_sasl_tls_security_options = noanonymous
     
    Last edited: Feb 16, 2014
  18. bobpit

    bobpit Member

Share This Page