Postfix/Dovecot Mail

Using the guide "Email with Postfix, Dovecot, and MariaDB on Centos7"

Having followed the guide verbatim, checked carefully, the mail server is not functioning.

For example:

1 Testing on page 8, step 9 (second part of step 9) Fails for email2email.

2 For a regular users for example "anthony" or "anthony.allen" I must sudo to send mail using the utility "mail"

The response from tail /var/log/maillog is typically:
(a) Bounce
(b) root user does not exist
(c) User does not exist
(d) Of course no mail is delivered anywhere

Of course there is something being overlooked but after a week and a weekend of pouring over everything I got nothing! I would appreciate the generous help.

Here is my tail:

(1) Root does not exist maybe due to having to sudo to mail

[anthony@sovereign ~]$ sudo tail /var/log/maillog
[sudo] password for anthony:
Jan 20 20:11:28 sovereign postfix/lmtp[30516]: 809F56D4A: to=root@icsiprojects.com, orig_to=<root>, relay=icsiprojects.com[private/dovecot-lmtp], delay=0.04, delays=0.01/0/0/0.03, dsn=5.1.1, status=bounced (host icsiprojects.com[private/dovecot-lmtp] said: 550 5.1.1 root@icsiprojects.com User doesn't exist: root@icsiprojects.com (in reply to RCPT TO command))
Jan 20 20:11:28 sovereign dovecot: lmtp(30520): Disconnect from local: Successful quit
Jan 20 20:11:28 sovereign postfix/cleanup[30514]: 8A6756D4C: message-id=20200121011128.8A6756D4C@icsiprojects.com
Jan 20 20:11:28 sovereign postfix/qmgr[2202]: 8A6756D4C: from=<>, size=2540, nrcpt=1 (queue active)
Jan 20 20:11:28 sovereign postfix/bounce[30519]: 809F56D4A: sender non-delivery notification: 8A6756D4C
Jan 20 20:11:28 sovereign postfix/qmgr[2202]: 809F56D4A: removed
Jan 20 20:11:28 sovereign dovecot: lmtp(30520): Connect from local
Jan 20 20:11:28 sovereign postfix/lmtp[30516]: 8A6756D4C: to=root@icsiprojects.com, relay=icsiprojects.com[private/dovecot-lmtp], delay=0.01, delays=0/0/0/0, dsn=5.1.1, status=bounced (host icsiprojects.com[private/dovecot-lmtp] said: 550 5.1.1 root@icsiprojects.com User doesn't exist: root@icsiprojects.com (in reply to RCPT TO command))
Jan 20 20:11:28 sovereign postfix/qmgr[2202]: 8A6756D4C: removed
Jan 20 20:11:28 sovereign dovecot: lmtp(30520): Disconnect from local: Successful quit</root>

(2) User does not exist

[anthony@sovereign ~]$ sudo tail /var/log/maillog
[sudo] password for anthony:
Jan 20 20:31:52 sovereign postfix/lmtp[32541]: 3B8DB6D4C: to=anthony@icsiprojects.com, orig_to=anthony.allen@icsiprojects.com, relay=icsiprojects.com[private/dovecot-lmtp], delay=0.01, delays=0.01/0/0/0, dsn=5.1.1, status=bounced (host icsiprojects.com[private/dovecot-lmtp] said: 550 5.1.1 anthony@icsiprojects.com User doesn't exist: anthony@icsiprojects.com (in reply to RCPT TO command))
Jan 20 20:31:52 sovereign dovecot: lmtp(32545): Disconnect from local: Successful quit
Jan 20 20:31:52 sovereign postfix/cleanup[32539]: 3E15C6D4A: message-id=20200121013152.3E15C6D4A@icsiprojects.com
Jan 20 20:31:52 sovereign postfix/qmgr[2202]: 3E15C6D4A: from=<>, size=2547, nrcpt=1 (queue active)
Jan 20 20:31:52 sovereign postfix/bounce[32544]: 3B8DB6D4C: sender non-delivery notification: 3E15C6D4A
Jan 20 20:31:52 sovereign postfix/qmgr[2202]: 3B8DB6D4C: removed
Jan 20 20:31:52 sovereign dovecot: lmtp(32545): Connect from local
Jan 20 20:31:52 sovereign postfix/lmtp[32541]: 3E15C6D4A: to=anthony@icsiprojects.com, relay=icsiprojects.com[private/dovecot-lmtp], delay=0.01, delays=0/0/0/0, dsn=5.1.1, status=bounced (host icsiprojects.com[private/dovecot-lmtp] said: 550 5.1.1 anthony@icsiprojects.com User doesn't exist: anthony@icsiprojects.com (in reply to RCPT TO command))
Jan 20 20:31:52 sovereign dovecot: lmtp(32545): Disconnect from local: Successful quit
Jan 20 20:31:52 sovereign postfix/qmgr[2202]: 3E15C6D4A: removed

4 Replies

I'm not sure what's causing the errors you're running into but I'd be interested in seeing the mail commands you ran that generated the errors. In addition, is icsiprojects.com hosted on the same server as where you're sending mail from? Is there a mailbox set up for the 'root' or 'anthony.allen' users?

Thank Sir for your interest

mail commands:

mail anthony@icsiprojects.com
mail anthony.allen@icsiprojects.com

Both are users on the system.

icsiprojects.com is hosted on the same server as to where mail is sent from.

(A) Root Mailboxe set up . No, a mail box for root was not set up

The documentation did not specify to set up a mail box for root. How ever this was used used per the documentation to add a user:

Page 5/17
Security would not allow posting SQL

This did not work so it was removed.

(B) mail box for anthony I followed the documentation and performed the following in page 9/17:

/etc/dovecot/conf.d/10-mail.conf

1 …
2 mail_location = maildir:/var/mail/vhosts/%d/%n
3 …
4 mail_privileged_group = mail
5 …
Create the /var/mail/vhosts/ directory and a subdirectory for your domain. Replace example.com with your domain name:

sudo mkdir -p /var/mail/vhosts/example.com
This directory will serve as storage for mail sent to your domain.

Create the vmail group with ID 5000. Add a new user vmail to the vmail group. This system user will read mail from the server.

sudo groupadd -g 5000 vmail
sudo useradd -g vmail -u 5000 vmail -d /var/mail/
Change the owner of the /var/mail/ folder and its contents to belong to vmail:

sudo chown -R vmail:vmail /var/mail/

The documentation does not mention setting up mail boxes. The *.cf files seemed to be setting up mailbox.

It looks like everything's set up and working properly but there aren't any mailboxes configured in the Postfix configuration. You're right that the individual /etc/postfix/mysql-virtual-*.cf files are part of the mailbox configuration, but so too are a few settings in /etc/postfix/main.cf

I'd recommend going over the Postfix configuration once more to make sure the virtual_mailbox_* values are set as you expect them, and each individual .cf file has the proper values.

If everything looks good, make sure to restart Postfix so that the settings are put into effect:
systemctl restart postfix

Hi mjones,

virtual_mailbox_* values are set as expected. A mail message was sent to anthony@icsiprojects.com. Here is the tail:

[root@sovereign anthony]# systemctl restart postfix
[root@sovereign anthony]# exit
exit
[anthony@sovereign ~]$ mail anthony@icsiprojects.com
Subject: ewsadffa
dasdfasdfasf
EOT
[anthony@sovereign ~]$ sudo tail /var/log/maillog
[sudo] password for anthony:
Jan 21 06:26:07 sovereign postfix/lmtp[13585]: AAD026A58: to=anthony@icsiprojects.com, relay=icsiprojects.com[private/dovecot-lmtp], delay=0.11, delays=0.03/0.02/0.01/0.05, dsn=5.1.1, status=bounced (host icsiprojects.com[private/dovecot-lmtp] said: 550 5.1.1 anthony@icsiprojects.com User doesn't exist: anthony@icsiprojects.com (in reply to RCPT TO command))
Jan 21 06:26:07 sovereign dovecot: lmtp(13586): Disconnect from local: Successful quit
Jan 21 06:26:07 sovereign postfix/cleanup[13583]: C273E6D3F: message-id=20200121112607.C273E6D3F@icsiprojects.com
Jan 21 06:26:07 sovereign postfix/bounce[13590]: AAD026A58: sender non-delivery notification: C273E6D3F
Jan 21 06:26:07 sovereign postfix/qmgr[12911]: C273E6D3F: from=<>, size=2426, nrcpt=1 (queue active)
Jan 21 06:26:07 sovereign postfix/qmgr[12911]: AAD026A58: removed
Jan 21 06:26:07 sovereign dovecot: lmtp(13586): Connect from local
Jan 21 06:26:07 sovereign postfix/lmtp[13585]: C273E6D3F: to=anthony@icsiprojects.com, relay=icsiprojects.com[private/dovecot-lmtp], delay=0.01, delays=0/0/0/0, dsn=5.1.1, status=bounced (host icsiprojects.com[private/dovecot-lmtp] said: 550 5.1.1 anthony@icsiprojects.com User doesn't exist: anthony@icsiprojects.com (in reply to RCPT TO command))
Jan 21 06:26:07 sovereign dovecot: lmtp(13586): Disconnect from local: Successful quit
Jan 21 06:26:07 sovereign postfix/qmgr[12911]: C273E6D3F: removed

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct