0

I have a VPS server, it worked like email server from 2015, but I reinstalled the Debian OS. (Old version 7.6, the new is 9.8) Before I reinstalled the OS, i backed up the postfix, dovecot, spamasassin config files. After I installed postfix,dovecot and spamasassin I reuploaded the config files. I can send emails but I can not receive, the mails not showing up in folders. But if I only send emails internal (from one user to another) its work, I can see the mail in the folder.

/var/log/syslog when I receive:

 May  2 12:19:00 asd postfix/smtpd[26747]: connect from mail-it1-f177.google.com[209.85.166.177]
May  2 12:19:01 asd postfix/smtpd[26747]: 2103921349: client=mail-it1-f177.google.com[209.85.166.177]
May  2 12:19:01 asd postfix/cleanup[26751]: 2103921349: message-id=<CAD=1mWB5QNHj8x1uSsOgFPNFSXBUhFAHFk85WSfA-79iST4RRA@mail.gmail.com>
May  2 12:19:01 asd opendkim[26249]: 2103921349: mail-it1-f177.google.com [209.85.166.177] not internal
May  2 12:19:01 asd opendkim[26249]: 2103921349: not authenticated
May  2 12:19:01 asd opendkim[26249]: 2103921349: DKIM verification successful
May  2 12:19:01 asd opendkim[26249]: 2103921349: s=20161025 d=gmail.com SSL
May  2 12:19:01 asd postfix/qmgr[26218]: 2103921349: from=<asd@gmail.com>, size=2602, nrcpt=1 (queue active)
May  2 12:19:01 asd postfix/smtpd[26747]: disconnect from mail-it1-f177.google.com[209.85.166.177] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
May  2 12:19:01 asd postfix/pickup[26217]: DD31E2134B: uid=1004 from=<asd@gmail.com>
May  2 12:19:01 asd postfix/cleanup[26751]: DD31E2134B: message-id=<CAD=1mWB5QNHj8x1uSsOgFPNFSXBUhFAHFk85WSfA-79iST4RRA@mail.gmail.com>
May  2 12:19:01 asd opendkim[26249]: DD31E2134B: no signing table match for 'asd@gmail.com'
May  2 12:19:01 asd postfix/pipe[26752]: 2103921349: to=<info@asd.com>, relay=spamassassin, delay=0.78, delays=0.31/0/0/0.46, dsn=2.0.0, status=sent (delivered via spamassassin service)
May  2 12:19:01 asd postfix/qmgr[26218]: 2103921349: removed
May  2 12:19:01 asd opendkim[26249]: DD31E2134B: DKIM verification successful
May  2 12:19:01 asd opendkim[26249]: DD31E2134B: s=20161025 d=gmail.com SSL
May  2 12:19:01 asd postfix/qmgr[26218]: DD31E2134B: from=<asd@gmail.com>, size=3196, nrcpt=1 (queue active)
May  2 12:19:01 asd postfix/cleanup[26751]: EB09621349: message-id=<CAD=1mWB5QNHj8x1uSsOgFPNFSXBUhFAHFk85WSfA-79iST4RRA@mail.gmail.com>
May  2 12:19:01 asd postfix/qmgr[26218]: EB09621349: from=<asd@gmail.com>, size=3328, nrcpt=1 (queue active)
May  2 12:19:01 asd postfix/local[26756]: DD31E2134B: to=<info@asd.hu>, relay=local, delay=0.06, delays=0.05/0/0/0, dsn=2.0.0, status=sent (forwarded as EB09621349)
May  2 12:19:01 asd postfix/qmgr[26218]: DD31E2134B: removed
May  2 12:19:02 asd postfix/smtp[26757]: EB09621349: to=<asd@gmail.com>, orig_to=<info@asd.hu>, relay=gmail-smtp-in.l.google.com[74.125.133.26]:25, delay=0.28, delays=0/0/0.07/0.2, dsn=2.0.0, status=sent (250 2.0.0 OK  1556792342 k16si9122076wrw.11 - gsmtp)
May  2 12:19:02 asd postfix/qmgr[26218]: EB09621349: removed
May  2 12:19:11 asd dovecot: imap-login: Login: user=<info>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=26759, secured, session=<aT4Y9+SH6sZ/AAAB>
May  2 12:19:11 asd dovecot: imap(info): Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead
May  2 12:19:11 asd dovecot: imap(info): Logged out in=90 out=896

dovecot.conf:

disable_plaintext_auth = no
mail_privileged_group = mail
mail_location = mbox:~/mail:INBOX=/var/mail/%u
userdb {
  driver = passwd
}
passdb {
  args = %s
  driver = pam
}
protocols = " imap"
disable_plaintext_auth = no
mail_privileged_group = mail
mail_location = mbox:~/mail:INBOX=/var/mail/%u
userdb {
  driver = passwd
}
passdb {
  args = %s
  driver = pam
}
protocols = " imap"

protocol imap {
  mail_plugins = "autocreate"
}
plugin {
  autocreate = Trash
  autocreate2 = Sent
  autosubscribe = Trash
  autosubscribe2 = Sent
}


service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}

ssl=required
ssl_cert = </etc/letsencrypt/live/asd/cert.pem
ssl_key = </etc/letsencrypt/live/asd/privkey.pem

main.cf

myhostname = asd.com
myorigin = /etc/mailname
mydestination = asd.com
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

smtpd_tls_cert_file=/etc/letsencrypt/live/asd/cert.pem
smtpd_tls_key_file=/etc/letsencrypt/live/asd/privkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_security_level=may
smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_tls_auth_only = no
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access
#smtpd_recipient_restrictions = reject_unauth_destination, check_sender_access hash:/etc/postfix/sender_access

milter_protocol = 2
milter_default_action = accept
smtpd_milters = inet:localhost:12301
non_smtpd_milters = inet:localhost:12301

Any tips? Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.