Unable to send, receive, and login to email. Using Roundcube, ISPConfig, Proxmox.

Discussion in 'Server Operation' started by djmixx07, Mar 16, 2010.

  1. djmixx07

    djmixx07 New Member

    Hi everyone, embarrassingly speaking..I am a complete newbie when it comes to Linux and server administration. I am trapped in a situation in my current work that all was turned over to me when our network administrator resigned. :( I work at a government office here in the Philippines.

    So here goes the problem. Our email (neither Roundcube or Thunderbird) is unable to send and receive emails. I am also unable to login to Roundcube. It just loads for a while after logging in then goes to the next page which is just a plain white page. Upon checking in ISPConfig, all the servers are online, specially POP3 and SMTP. :confused:

    So I just can't figure out whats going on, and what's wrong with it. It was working perfectly last week. Then just broke down all of a sudden. I did series of shutdowns and restarts at our 2 baremetal servers..but to no avail.
    I am not sure if it's about postfix because when I do "/etc/init.d/postfix restart", it says that it's already running.. But when I do "/etc/init.d/postfix status", it says it's not running..which is very confusing as well.

    I really hope for your help guys. I would greatly appreciate any assistance. Thanks in advance.

    PS:
    Since I am a complete novice in Linux, if you can assist also in what command to type in terminal..I would REALLY appreciate it.

    Kindly,
    DJ
     
  2. falko

    falko Super Moderator

    Which distribution do you use? Do you use ISPConfig 2 or 3?

    Are there any errors in your mail log?
     
  3. djmixx07

    djmixx07 New Member

    Hi Falko,

    I think we are using ISPConfig 2.x.

    Here are what's in my mail log..(quite long but repetitive):
    Mar 18 08:54:38 mail postfix/local[31501]: fatal: open database /etc/aliases.db: No such file or directory
    Mar 18 08:54:39 mail postfix/master[2821]: warning: process /usr/libexec/postfix/local pid 31501 exit status 1
    Mar 18 08:54:39 mail postfix/master[2821]: warning: /usr/libexec/postfix/local: bad command startup -- throttling
    Mar 18 08:54:52 mail postfix/smtpd[31504]: fatal: open database /etc/aliases.db: No such file or directory
    Mar 18 08:54:53 mail postfix/master[2821]: warning: process /usr/libexec/postfix/smtpd pid 31504 exit status 1
    Mar 18 08:54:53 mail postfix/master[2821]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Mar 18 08:55:39 mail postfix/local[31527]: fatal: open database /etc/aliases.db: No such file or directory
    Mar 18 08:55:40 mail postfix/master[2821]: warning: process /usr/libexec/postfix/local pid 31527 exit status 1
    Mar 18 08:55:40 mail postfix/master[2821]: warning: /usr/libexec/postfix/local: bad command startup -- throttling

    Thanks so much for giving time on my issue.
     
  4. djmixx07

    djmixx07 New Member

    I did telnet localhost 25, these are the results:

    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 mail.immigration.gov.ph ESMTP Postfix (2.4.5)
    421 4.4.2 mail.immigration.gov.ph Error: timeout exceeded
    Connection closed by foreign host.

    -----------------------------------
    And these are for main.cf:

    mynetworks = 127.0.0.0/8, 124.6.144.0/29
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/postfix/aliases
    virtual_maps = hash:/etc/postfix/virtual
    smtpd_banner = mail.immigration.gov.ph ESMTP Postfix ($mail_version)
    home_mailbox=
    mail_spool_directory = /var/mail
    myhostname = mail.immigration.gov.ph
    mydomain = immigration.gov.ph
    inet_interfaces = all
    default_transport = smtp
    myorigin = immigration.gov.ph
    mydestination = immigration.gov.ph

    smtp_sasl_local_domain =
    smtp_sasl_auth_enable = yes
    smtp_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpb_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains
    smtpd_tls_auth_only = no
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_use_tls = yes
    smtp_use_tls = yes
    smtpd_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tlsloglevel = 1
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    smtp_tls_note_starttls_offer = yes
    tls_random_source = dev:/dev/urandom
    inet_protocols = ipv4

    Hope this helps. Thanks
     
  5. falko

    falko Super Moderator

    Please try this:
    Code:
    newaliases
    /etc/init.d/postfix restart
     
  6. djmixx07

    djmixx07 New Member

    Hi Falko,

    Here are the results from what you asked me to do.

    Code:
    mail:~# newaliases
    mail:~# /etc/init.d/postfix restart
    Stopping Postfix Mail Transport Agent: postfix.
    Starting Postfix Mail Transport Agent: postfixpostfix/postfix-script: fatal: the Postfix mail system is already running
     failed!
    and my mail.log now is different (sorry quite long).

    Code:
    Mar 19 16:01:10 mail postfix/smtpd[3770]: disconnect from web54505.mail.re2.yahoo.com[206.190.49.155]
    Mar 19 16:03:01 mail postfix/smtpd[3828]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
    Mar 19 16:03:01 mail postfix/smtpd[3828]: warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in
    Mar 19 16:03:01 mail postfix/smtpd[3828]: warning: TLS has been selected, but TLS support is not compiled in
    Mar 19 16:03:01 mail postfix/smtpd[3828]: connect from mx.bol.com.br[200.221.29.128]
    Mar 19 16:03:01 mail postfix/smtpd[3831]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
    Mar 19 16:03:01 mail postfix/smtpd[3831]: warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in
    Mar 19 16:03:01 mail postfix/smtpd[3831]: warning: TLS has been selected, but TLS support is not compiled in
    Mar 19 16:03:01 mail postfix/smtpd[3831]: connect from mx.bol.com.br[200.221.29.128]
    Mar 19 16:03:01 mail postfix/trivial-rewrite[3832]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
    Mar 19 16:03:01 mail postfix/smtpd[3828]: warning: support for restriction "check_relay_domains" will be removed from Postfix; use "reject_unauth_destination" instead
    Mar 19 16:03:01 mail postfix/cleanup[3833]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
    Mar 19 16:03:01 mail postfix/smtpd[3828]: CF7D438E05E: client=mx.bol.com.br[200.221.29.128]
    Mar 19 16:03:02 mail postfix/smtpd[3831]: warning: support for restriction "check_relay_domains" will be removed from Postfix; use "reject_unauth_destination" instead
    Mar 19 16:03:02 mail postfix/cleanup[3834]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
    Mar 19 16:03:02 mail postfix/smtpd[3831]: 424AF38E05F: client=mx.bol.com.br[200.221.29.128]
    Mar 19 16:03:02 mail postfix/cleanup[3833]: CF7D438E05E: message-id=<20100319080254.B0F117000F33@selva8.bol.com.br>
    Mar 19 16:03:03 mail postfix/qmgr[2789]: CF7D438E05E: from=<>, size=8161, nrcpt=1 (queue active)
    Mar 19 16:03:03 mail postfix/smtpd[3828]: disconnect from mx.bol.com.br[200.221.29.128]
    Mar 19 16:03:03 mail postfix/local[3835]: CF7D438E05E: to=<www-data@immigration.gov.ph>, relay=local, delay=1.2, delays=1.2/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
    Mar 19 16:03:03 mail postfix/qmgr[2789]: CF7D438E05E: removed
    Mar 19 16:03:03 mail postfix/cleanup[3834]: 424AF38E05F: message-id=<20100319080254.B7373700110A@selva8.bol.com.br>
    Mar 19 16:03:03 mail postfix/qmgr[2789]: 424AF38E05F: from=<>, size=8185, nrcpt=1 (queue active)
    Mar 19 16:03:03 mail postfix/smtpd[3831]: disconnect from mx.bol.com.br[200.221.29.128]
    Mar 19 16:03:03 mail postfix/local[3835]: 424AF38E05F: to=<www-data@immigration.gov.ph>, relay=local, delay=1.3, delays=1.3/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
    Mar 19 16:03:03 mail postfix/qmgr[2789]: 424AF38E05F: removed
    Mar 19 16:03:07 mail postfix/smtpd[3828]: connect from jazz.globequest.com.ph[202.95.234.228]
    Mar 19 16:03:07 mail postfix/smtpd[3831]: connect from jazz.globequest.com.ph[202.95.234.228]
    Mar 19 16:03:07 mail postfix/smtpd[3828]: E445238E05E: client=jazz.globequest.com.ph[202.95.234.228]
    Mar 19 16:03:08 mail postfix/cleanup[3833]: E445238E05E: message-id=<20100319054933.ABE43700020A@selva14.bol.com.br>
    Mar 19 16:03:08 mail postfix/smtpd[3831]: 0397E38E05F: client=jazz.globequest.com.ph[202.95.234.228]
    Mar 19 16:03:08 mail postfix/cleanup[3834]: 0397E38E05F: message-id=<20100319070624.1593370004E6@selva15.bol.com.br>
    Mar 19 16:03:08 mail postfix/smtpd[3828]: disconnect from jazz.globequest.com.ph[202.95.234.228]
    Mar 19 16:03:08 mail postfix/qmgr[2789]: E445238E05E: from=<>, size=8745, nrcpt=1 (queue active)
    Mar 19 16:03:08 mail postfix/local[3835]: E445238E05E: to=<www-data@immigration.gov.ph>, relay=local, delay=0.24, delays=0.23/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
    Mar 19 16:03:08 mail postfix/qmgr[2789]: E445238E05E: removed
    Mar 19 16:03:08 mail postfix/smtpd[3831]: disconnect from jazz.globequest.com.ph[202.95.234.228]
    Mar 19 16:03:08 mail postfix/qmgr[2789]: 0397E38E05F: from=<>, size=8769, nrcpt=1 (queue active)
    Mar 19 16:03:08 mail postfix/local[3835]: 0397E38E05F: to=<www-data@immigration.gov.ph>, relay=local, delay=0.23, delays=0.22/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
    Mar 19 16:03:08 mail postfix/qmgr[2789]: 0397E38E05F: removed
    Here's a result again from telnet localhost 25.

    Code:
    mail:~# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 mail.immigration.gov.ph ESMTP Postfix (2.4.5)
    ehlo localhost
    250-mail.immigration.gov.ph
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    
    Hope this helps falko. Thanks so much
     
  7. djmixx07

    djmixx07 New Member

    I was trying to do dpkg-reconfigure postfix. And it gave me this result.

    Code:
    mail:~# dpkg-reconfigure postfix
    /usr/sbin/dpkg-reconfigure: postfix is broken or not fully installed
     
  8. falko

    falko Super Moderator


    How exactly did you install Postfix? Did you use a guide from HowtoForge?
     
  9. SamTzu

    SamTzu HowtoForge Supporter

    Proxmox/OpenVz memory issues

    The clue to solve the problem can be in the 'throtling' word.

    Check if Proxmox VM is OpenVz or KVM.
    OpenVZ virtualisation is a bit different from your 'normal' servers or KVM's.
    It looks like you are having memory problems on your Virtual Machines.
    From the Proxmox web-console try increasing the memory allocated to the mail server. In servers that sometimes have problems with PHP or other services the memory usage sometimes 'peaks' and causes the OpenVZ containers to 'throtle' the memory usage. This can cause services to stop or crash on the containers.

    I found that increasing the non-existant "swap" memory on the containers solved the issue on some of our problem servers.

    Since OpenVZ uses filesystem level virtualisation there is no real "swap" memory on the containers anyway.
     
    Last edited: Mar 20, 2010
  10. djmixx07

    djmixx07 New Member

    Hi Falko,
    Postfix is already installed when the servers has been turned over to me. I am not sure if the past network admin used a guide in Howtoforge or elsewhere. But it was all working well until it crashed. Will try to check on SamTzu's guide. Will post again for any updates about the issue. Thanks!
     
  11. djmixx07

    djmixx07 New Member

    Hi SamTzu,

    Thanks for the assistance. I will try to check on this and try to increase the mail server's memory allocation in the VM. Not sure if it's OpenVZ or KVM though. Thanks!

    Kindly,
    DJ
     
  12. djmixx07

    djmixx07 New Member

    Oh SamTzu, its a KVM.
     
  13. djmixx07

    djmixx07 New Member

    The memory allocation for the mail server VM seems ok. Here is the screenshot.
    [​IMG]

    Here is also the screenshot of the Cluster node where the mail server is located.
    [​IMG]

    Hope this helps.

    I am really lost here now on how to solve the problem.:confused: Thanks guys for giving some time to help solve it.
     
  14. djmixx07

    djmixx07 New Member

    Ok, im trying to mess around since i can restore it if i do something awfully wrong. Our previous net admin left an old (maybe obsolete) manual..so I tried some of it. I tried to "apt-get purge postfix", then "apt-get autoremove postfix".

    Then I reinstalled it with "apt-get install postfix":
    Code:
    General type of configuration? <-- Internet Site
    Mail name? <-- [I]server1.domainname.com[/I]
    then did "dpkg-reconfigure postfix":
    Code:
    General type of configuration? <-- Internet Site
    Where should mail for root go <-- [blank]
    Mail name? <-- [I]server1.domainname.com[/I]
    Other destinations to accept mail for? (blank for none) <--
    [I]server1.domainname.com[/I], localhost.[I]domainname.com[/I], localhost.localdomain, localhost
    Force synchronous updates on mail queue? <-- No
    Local networks? <-- 127.0.0.0/8, 124.x.x.0/29
    Use procmail for local delivery? <-- Yes
    Mailbox size limit <-- 0
    Local address extension character? <-- +
    Internet protocols to use? <-- all
    then:
    Code:
    postconf -e 'smtpd_sasl_local_domain ='
    postconf -e 'smtpd_sasl_auth_enable = yes'
    postconf -e 'smtpd_sasl_security_options = noanonymous'
    postconf -e 'broken_sasl_auth_clients = yes'
    postconf -e 'smtpd_recipient_restrictions =
    permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
    postconf -e 'inet_interfaces = all'
    echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf
    echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf
    The manual said to create the certificates for TLS doing these:
    Code:
    mkdir /etc/postfix/ssl
    cd /etc/postfix/ssl/
    openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
    
    chmod 600 smtpd.key
    openssl req -new -key smtpd.key -out smtpd.csr
    
    openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out
    smtpd.crt
    
    openssl rsa -in smtpd.key -out smtpd.key.unencrypted
    
    mv -f smtpd.key.unencrypted smtpd.key
    openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out
    cacert.pem -days 3650
    then:
    Code:
    postconf -e 'smtpd_tls_auth_only = no'
    postconf -e 'smtp_use_tls = yes'
    postconf -e 'smtpd_use_tls = yes'
    postconf -e 'smtp_tls_note_starttls_offer = yes'
    postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
    postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
    postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
    postconf -e 'smtpd_tls_loglevel = 1'
    postconf -e 'smtpd_tls_received_header = yes'
    postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
    postconf -e 'tls_random_source = dev:/dev/urandom'
    postconf -e 'myhostname = [I]domainname.com[/I]'
    
    /etc/init.d/postfix restart
    
    mkdir -p /var/spool/postfix/var/run/saslauthd
    
    /etc/init.d/saslauthd start
    Now a problem again arises. The manual said to do "telnet localhost 25", and "ehlo localhost" after it establishes a connection. But I get stuck with telnet having this:
    Code:
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    I tried to check mail.log and mail.err to find this:

    mail.log:
    Code:
    Mar 22 17:58:23 mail postfix/master[2681]: warning: master_wakeup_timer_event: service pickup(public/pickup): No such file or directory
    Mar 22 17:58:57 mail postfix/smtpd[14832]: fatal: open lock file pid/inet.smtp: cannot create file exclusively: No such file or directory
    Mar 22 17:58:58 mail postfix/master[2681]: warning: process /usr/libexec/postfix/smtpd pid 14832 exit status 1
    Mar 22 17:58:58 mail postfix/master[2681]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    mail.err:
    Code:
    Mar 22 18:16:14 mail postfix/smtpd[15240]: fatal: open lock file pid/inet.smtp: cannot create file exclusively: No such file or directory
    Here's the current main.cf:
    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 (Debian/GNU)
    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 = no
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/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 = [I]server1.domainname.com[/I]
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = [I]server1.domainname.com[/I], localhost.[I]domainname.com[/I], localhost.localdomain, localhost
    relayhost = 
    mynetworks = 127.0.0.0/8, [I]124.x.x.0/29[/I]
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain = 
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    Hope this all helps to fix my problem. Thanks Falko and SamTzu for your assistance, you've been great. If I have to reinstall postfix again or restore it again to the point before I did all these, please let me know.

    Kindly,
    DJ
     
  15. falko

    falko Super Moderator

    Is it possible that there are still some Postfix processes running? What are the outputs of
    Code:
    netstat -tap
    and
    Code:
    ps aux
    ?
     
  16. djmixx07

    djmixx07 New Member

    Almost done..

    Thanks falko,
    You're right, that might have been the problem when I uninstalled Postfix; that there are still some Postfix processes running that's why I can't do telnet. Because yesterday I realized that and tried to do a clean uninstall using
    Code:
    aptitude remove postfix* --purge
    which I saw when I was doing some research about the problem with telnet or port 25 being already used.

    Doing that suddenly made everything ok with my new installation of postfix. But the next problem was POP3 was offline in ISPConfig and pop3/imap was also missing in "nmap localhost". Found a similar problem in one of your archived forums; and so I reinstalled my Courier using
    Code:
    apt-get install courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0
    which I found here: http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig2-p4

    Everything went ok after that with POP3 and IMAP showing now in my nmap localhost, and POP3 now showing online status in ISPConfig. But here's a new issue that suddenly came up..I ran some test emails using webmail (Roundcube) and Thunderbird. I was able to successfully send out emails but when I reply or send email FROM outside domains like Gmail and Yahoo -- it bounces back. Check the mail log and it shows that it's rejecting/refusing connections from outside the server. Here's the error:
    Code:
    NOQUEUE: reject: RCPT from mail-pv0-f171.google.com[[I]x.x.x.x[/I]]: 554 5.7.1 <[I]emailname@domainname.com[/I]>: Relay access denied; from=<djdelossantos@gmail.com> to=<[I]emailname@domainname.com[/I]> proto=ESMTP helo=<mail-pv0-f171.google.com>
    It also shows this:
    Code:
    mail postfix/smtpd[20597]: warning: unknown[[I]x.x.x.x[/I]]: SASL LOGIN authentication failed: authentication failure
    I don't know what next to do, but I'm also doing my research. Thanks Falko for the help. Hope we solve this once and for all. :cool:

    BTW, here's my postconf -n:
    Code:
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    mydestination = [I]sample1.domainname.com[/I], localhost.[I]domainname.com[/I], localhost.localdomain, localhost
    myhostname = [I]sample1.domainname.com[/I]
    mynetworks = 127.0.0.0/8, 124.x.x.0/29
    myorigin = /etc/mailname
    readme_directory = no
    recipient_delimiter = +
    relayhost = 
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain = 
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom
     
  17. djmixx07

    djmixx07 New Member

    Hi Falko,
    Ok this is what I've done so far from what I have been reading online (specially @Howtoforge.com). The problem with emails sent to me from outside the domain like Gmail, and having the error in my mail log "NOQUEUE: reject: Relay access denied", I think (not sure) has been solved -- but not really. What I did was to add:
    Code:
    mydestination = /etc/postfix/local-host-names 
    to my main.cf and restarted postfix.
    versus
    What I had before which was:
    Code:
    mydestination = sample1.domainname.com, localhost.domainname.com, localhost.localdomain, localhost
    Ok the emails I sent FROM gmail didn't bounce back anymore and I didn't get the "NOQUEUE: reject: Relay access denied" error anymore! Hallelujah!

    But the problem is the webmail (Roundcube) and mail client (Thunderbird) is not receiving anything! I don't know if it's stored or got lost somewhere. :mad: ..this is kinda frustrating because I thought I got my problem solved once and for all. I hope you guys can help me solve this "new" issue that came up. And I hope my posts has helped anyone in any way. Thanks!

    Heres my new mail.log:
    Code:
    Mar 24 18:57:16 mail postfix/cleanup[17760]: 6CE0C3B013C: message-id=<ac18d1d21003240357x3602905h151a99e66c4cd5e9@mail.gmail.com>
    Mar 24 18:57:16 mail postfix/qmgr[15853]: 6CE0C3B013C: from=<djdelossantos@gmail.com>, size=2584, nrcpt=1 (queue active)
    Mar 24 18:57:16 mail postfix/pickup[15852]: D9F483B013F: uid=10066 from=<web1_anarciso>
    Mar 24 18:57:16 mail postfix/cleanup[17759]: D9F483B013F: message-id=<20100324105716.D9F483B013F@mail.immigration.gov.ph>
    Mar 24 18:57:16 mail postfix/qmgr[15853]: D9F483B013F: from=<web1_anarciso@mail.immigration.gov.ph>, size=415, nrcpt=1 (queue active)
    Mar 24 18:57:16 mail postfix/local[17779]: D9F483B013F: to=<admispconfig@localhost.localdomain>, relay=local, delay=0.05, delays=0.03/0/0/0.02, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Mar 24 18:57:16 mail postfix/qmgr[15853]: D9F483B013F: removed
    Mar 24 18:57:44 mail postfix/local[17813]: 6CE0C3B013C: to=<web1_anarciso@mail.immigration.gov.ph>, orig_to=<anarciso@immigration.gov.ph>, relay=local, delay=28, delays=0.59/0/0/28, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Mar 24 18:57:44 mail postfix/qmgr[15853]: 6CE0C3B013C: removed
    Mar 24 18:57:47 mail postfix/smtpd[18133]: disconnect from mail-px0-f176.google.com[209.85.216.176]
     
  18. falko

    falko Super Moderator

    Do you use ISPConfig 2? If so, you must also add
    Code:
    virtual_maps = hash:/etc/postfix/virtusertable
    to /etc/postfix/main.cf and restart Postfix.
     
  19. djmixx07

    djmixx07 New Member

    That is already in my main.cf falko..but it doesn't show in postconf.

    here's my main.cf:
    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 (Debian/GNU)
    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 = no
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/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 = [I]server1.mydomain.com[/I]
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = /etc/postfix/local-host-names 
    relayhost = 
    mynetworks = 127.0.0.0/8, 124.6.144.0/29
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain = 
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    virtual_maps = hash:/etc/postfix/virtusertable
    mydomain = [I]mydomain.com[/I]
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    
    and here's my postconf -n:
    Code:
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    mydestination = /etc/postfix/local-host-names
    mydomain = [I]mydomain.com[/I]
    myhostname = [I]server1.mydomain.com[/I]
    mynetworks = 127.0.0.0/8, 124.6.144.0/29
    myorigin = /etc/mailname
    readme_directory = no
    recipient_delimiter = +
    relayhost = 
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain = 
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom
    
     
    Last edited: Mar 25, 2010
  20. falko

    falko Super Moderator

    Did you configure ISPConfig to use Maildir (Management > Server > Settings > Email)?
     

Share This Page