I just installed Postfix on Debian minimum server and configured it as below:
installation:
- installed it
- chose
internet site
- set name to
mydomainname.com
/etc/postfix/main.cf
configs:
- changed
myhostname
tomydomainname.com
- changed
alias_maps
tovirtual_alias_maps
and set it tohash:/etc/postfix/virtual
/etc/postfix/virtual
content:
(Shahab@eeePC is my local user with capital first letter!!)
- add entry
shahab@mydomainname.com Shahab
- ran
sudo postmap /etc/postfix/virtual
- ran
sudo service postfix restart
I sent an email from gamil to shahab@mydomainname.com
and here is the records of /var/log/mail.log
:
Sep 6 23:24:13 eeePC postfix/postfix-script[528]: warning: symlink leaves directory: /etc/postfix/./makedefs.out
Sep 6 23:24:13 eeePC postfix/postfix-script[564]: starting the Postfix mail system
Sep 6 23:24:13 eeePC postfix/master[566]: daemon started -- version 3.4.14, configuration /etc/postfix
Sep 6 23:26:56 eeePC postfix/smtpd[590]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 6 23:26:57 eeePC postfix/smtpd[590]: connect from mail-qt1-f182.google.com[209.85.160.182]
Sep 6 23:26:58 eeePC postfix/smtpd[590]: C4BC2406C0: client=mail-qt1-f182.google.com[209.85.160.182]
Sep 6 23:26:58 eeePC postfix/cleanup[595]: C4BC2406C0: message-id=<CACR=pCMwDK+U_cLTVHsQFk+xmqtdJNZMzHe7M7CPtEn-SXBvGQ@mail.gmail.com>
Sep 6 23:26:58 eeePC postfix/qmgr[569]: C4BC2406C0: from=<mygmailaccount@gmail.com>, size=2512, nrcpt=1 (queue active)
Sep 6 23:26:58 eeePC postfix/local[596]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 6 23:26:59 eeePC postfix/local[596]: C4BC2406C0: to=<Shahab@mydomainname.com>, relay=local, delay=0.33, delays=0.16/0.06/0/0.11, dsn=5.1.1, status=bounced (unknown user: "shahab")
Sep 6 23:26:59 eeePC postfix/cleanup[595]: 11188406CD: message-id=<20200906232659.11188406CD@mydomainname.com>
Sep 6 23:26:59 eeePC postfix/qmgr[569]: 11188406CD: from=<>, size=4322, nrcpt=1 (queue active)
Sep 6 23:26:59 eeePC postfix/bounce[597]: C4BC2406C0: sender non-delivery notification: 11188406CD
Sep 6 23:26:59 eeePC postfix/qmgr[569]: C4BC2406C0: removed
Sep 6 23:26:59 eeePC postfix/smtpd[590]: disconnect from mail-qt1-f182.google.com[209.85.160.182] ehlo=2 starttls=1 mail=1 rcpt=1 bdat=1 quit=1 commands=7
Sep 6 23:27:02 eeePC postfix/smtp[599]: 11188406CD: to=<mygmailaccount@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.143.27]:25, delay=3.3, delays=0.08/0/07/2.4/0.71, dsn=2.0.0, status=sent (250 2.0.0 OK 1599434822 k16si8490222ejd.738 - gsmtp)
Sep 6 23:27:02 eeePC postfix/qmgr[569]: 11188406CD: removed
Sep 6 23:30:19 eeePC postfix/anvil[593]: statistics: max connection rate 1/60s for (smtp:209.85.160.182) at Sep 6 23:26:57
Sep 6 23:30:19 eeePC postfix/anvil[593]: statistics: max connection count 1 for (smtp:209.85.160.182) at Sep 6 23:26:57
Sep 6 23:30:19 eeePC postfix/anvil[593]: statistics: max cache size 1 at Sep 6 23:26:57
problem is Postfix can't recognize my user or something and removes the mail.