SOLVED: Can't receive mail with postfix

Discussion in 'Server Operation' started by Anozer, Aug 21, 2016.

  1. Anozer

    Anozer New Member

    Hello,

    I've juste followed the Ubuntu 16.04 perfect server guide. Everything seems to work except one thing : I can't receive any email. But I can send them, use IMAP ...

    Do you have any idea that could help me ?
    This is the first server I'm configuring. I'm not sure of what log could be helpful so here is my /var/log/mail.log :
    Code:
    Aug 21 02:55:06 myserver postfix/smtpd[1471]: connect from mail2.otherserver.com[12.34.56.78]
    Aug 21 02:55:06 myserver postfix/proxymap[1327]: warning: mysql:/etc/postfix/mysql-virtual_domains.cf is unavailable. open /etc/postfix/mysql-virtual_domains.cf: Permission denied
    Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: virtual_mailbox_domains: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf: table lookup problem
    Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: virtual_mailbox_domains lookup failure
    Aug 21 02:55:06 myserver postfix/proxymap[1327]: warning: mysql:/etc/postfix/mysql-virtual_domains.cf is unavailable. open /etc/postfix/mysql-virtual_domains.cf: Permission denied
    Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: virtual_mailbox_domains: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf: table lookup problem
    Aug 21 02:55:06 myserver postfix/proxymap[1327]: warning: mysql:/etc/postfix/mysql-virtual_transports.cf is unavailable. open /etc/postfix/mysql-virtual_transports.cf: Permission denied
    Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "[email protected]"
    Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: transport_maps lookup failure
    Aug 21 02:55:06 myserver postfix/smtpd[1471]: NOQUEUE: reject: RCPT from mail2.otherserver.com[12.34.56.78]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail2.otherserver.com>
    Aug 21 02:55:06 myserver postfix/smtpd[1471]: disconnect from mail2.otherserver.com[12.34.56.78] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
     
  2. vinsan

    vinsan New Member

    mysql-virtual_domains.cf: Permission denied
    mysql-virtual_transports.cf: Permission denied
    you sure those files are created?
    if so maybe you need to change user permission for those files
     
  3. Anozer

    Anozer New Member

    Here is the content of my /etc/postfix

    Code:
    total 224
    drwxr-xr-x   3 root root     4096 août  21 03:06 .
    drwxr-xr-x 128 root root    12288 août  21 01:07 ..
    -rw-r--r--   1 root root     1569 août  21 00:41 blacklist_helo
    -rw-r--r--   1 root root        0 août  21 00:41 body_checks
    -rw-r--r--   1 root root      153 août  20 23:58 dynamicmaps.cf
    -rw-r--r--   1 root root        0 août  21 00:41 header_checks
    -rw-r--r--   1 root root      608 août  21 00:41 helo_access
    -rw-r--r--   1 root root     4649 août  21 02:14 main.cf
    -rw-r--r--   1 root root     4649 août  21 02:14 main.cf~
    -rw-r--r--   1 root root     4537 août  21 00:42 main.cf~2
    -rw-r--r--   1 root root     4441 août  21 00:42 main.cf~3
    -rw-r--r--   1 root root     7750 août  21 00:42 master.cf
    -r--------   1 root root     6392 août  21 00:42 master.cf~
    -r--------   1 root root     6236 août  21 00:42 master.cf~2
    -rw-r--r--   1 root root        0 août  21 00:41 mime_header_checks
    -rw-r-----   1 root root      231 août  21 00:41 mysql-virtual_client.cf
    -rw-r-----   1 root root      221 août  21 00:41 mysql-virtual_domains.cf
    -rw-r-----   1 root root      218 août  21 00:41 mysql-virtual_email2email.cf
    -rw-r--r--   1 root postfix   317 août  21 00:41 mysql-virtual_forwardings.cf
    -rw-r-----   1 root root      288 août  21 00:41 mysql-virtual_mailboxes.cf
    -rw-r-----   1 root root      251 août  21 00:41 mysql-virtual_outgoing_bcc.cf
    -rw-r-----   1 root root      346 août  21 00:41 mysql-virtual_policy_greylist.cf
    -rw-r-----   1 root root      252 août  21 00:41 mysql-virtual_recipient.cf
    -rw-r-----   1 root root      224 août  21 00:41 mysql-virtual_relaydomains.cf
    -rw-r-----   1 root root      230 août  21 00:41 mysql-virtual_relayrecipientmaps.cf
    -rw-r-----   1 root root      249 août  21 00:41 mysql-virtual_sender.cf
    -rw-r-----   1 root root      320 août  21 00:41 mysql-virtual_sender_login_maps.cf
    -rw-r-----   1 root root      227 août  21 00:41 mysql-virtual_transports.cf
    -rw-r--r--   1 root root        0 août  21 00:41 nested_header_checks
    -rw-r--r--   1 root root    21233 avril 13 18:58 postfix-files
    -rwxr-xr-x   1 root root     9344 avril 13 18:58 postfix-script
    -rwxr-xr-x   1 root root    29446 avril 13 18:58 post-install
    drwxr-xr-x   2 root root     4096 avril 13 18:58 sasl
    -rw-r--r--   1 root root     1866 août  21 00:42 smtpd.cert
    -rw-r-----   1 root root     3268 août  21 00:42 smtpd.key
    -rw-r--r--   1 root root       35 août  21 00:41 tag_as_foreign.re
    -rw-r--r--   1 root root       35 août  21 00:41 tag_as_originating.re
    I have older messages in /var/log/mail.log with the same type of error. "Permission denied" on each file in /etc/postix.

    I did a chmod 755 on /etc/postfix, nothing changed.

    Should I change permissions on the files ? How ?
     
  4. vinsan

    vinsan New Member

    chgrp postfix /etc/postfix/mysql-*.cf
    chmod u=rw,g=r,o= /etc/postfix/mysql-*.cf
     
    misterm and Anozer like this.
  5. Anozer

    Anozer New Member

    It works ! Thanks a lot vinsan !

    After doing this I also had this problem. I fixed it following the solution in the comments.
     
  6. vinsan

    vinsan New Member

  7. loualberlaurel

    loualberlaurel New Member

    Kept receiving this error. I haven't been receiving emails, seems they are being queued.

    smtp-deb6 postgrey[6888]: action=pass, reason=client whitelist, client_name=mail-yw0-f182.google client_address=xxx.xx.xxx.xxx, sender=email@gmail, recipient=email@mydomain
    Oct 25 06:19:01 smtp-deb6 postfix/qmgr[18351]: E054C1A38144: from=<email@gmail.>, size=2487, nrcpt=1 (queue active)
     

Share This Page