CentOS 7 Mail server error (User unknown in virtual alias table) Dovecot Postfix MySQL
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
doveconf -n:
# 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-1160.108.1.el7.x86_64 x86_64 CentOS Linux release 7.9.2009 (Core) xfs
# Hostname: mail.domain.com
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_uid = 1000
listen = *
mail_location = maildir:/home/vmail/%d/%n
mbox_write_locks = fcntl
namespace inbox {
hidden = no
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix = INBOX.
separator = .
type = private
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
service auth-worker {
user = root
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-master {
mode = 0600
user = vmail
}
user = root
}
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
unix_listener lmtp {
mode = 0666
}
}
service pop3-login {
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
ssl = no
ssl_cert = </etc/letsencrypt/live/mail.domain.com/fullchain.pem
ssl_key = # hidden, use -P to show it
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
userdb {
args = uid=vmail gid=vmail home=/home/vmail/%d/%n
driver = static
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
log_path = /home/vmail/dovecot-deliver.log
postmaster_address = postmaster@domain.com
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
I'm encountering an issue with my mail server configuration on CentOS 7. Specifically, I'm unable to send emails to remote mail servers such as Gmail or any other domain. Initially, I included transport_maps, but encountered a "user unknown" error. To address this, I added transport_maps = hash:/etc/postfix/transport, which resolved the issue with Gmail by specifying gmail.com smtp:[smtp.gmail.com]:587. However, this fix only applies to Gmail, and I still cannot send emails to other domains like user@domain.com, .org, or .net.
Locally, I can both send and receive emails without any problems. However, the issue persists when attempting to send emails remotely...
I'm encountering an issue with my mail server configuration on CentOS 7. Specifically, I'm unable to send emails to remote mail servers such as Gmail or any other domain. Initially, I included transport_maps, but encountered a "user unknown" error. To address this, I added transport_maps = hash:/etc/postfix/transport, which resolved the issue with Gmail by specifying gmail.com smtp:[smtp.gmail.com]:587. However, this fix only applies to Gmail, and I still cannot send emails to other domains like user@domain.com, .org, or .net. Locally, I can both send and receive emails without any problems. However, the issue persists when attempting to send emails remotely...
Right, because you haven't set a relay host up to send mail your system doesn't know what to do with. You have a relay at smtp.domain.com (assuming you sanitized that), which means it only knows about YOUR domain, and (thanks to the transport map) Gmail. You need a relay host that is outside your domain.
Right, because you haven't set a relay host up to send mail your system doesn't know what to do with. You have a relay at smtp.domain.com (assuming you sanitized that), which means it only knows about YOUR domain, and (thanks to the transport map) Gmail. You need a relay host that is outside your domain.
I recently removed the relayhost and transport_maps configurations because I aimed to send emails to any destination, including Yahoo, Gmail, and others. However, since their removal, I've encountered an error when attempting to send emails. The error message reads as follows:
May 9 08:44:26 mail postfix/pipe[17862]: AF62FF822: to=<auser@gmail.com>, relay=dovecot, delay=0.13, delays=0.06/0.02/0/0.05, dsn=5.1.1, status=bounced (user unknown)
It seems that the server is unable to deliver the email to the specified user (auser@gmail.com), resulting in a "user unknown" status.
I recently removed the relayhost and transport_maps configurations because I aimed to send emails to any destination, including Yahoo, Gmail, and others. However, since their removal, I've encountered an error when attempting to send emails. The error message reads as follows:
Code:
May 9 08:44:26 mail postfix/pipe[17862]: AF62FF822: to=<auser@gmail.com>, relay=dovecot, delay=0.13, delays=0.06/0.02/0/0.05, dsn=5.1.1, status=bounced (user unknown)
It seems that the server is unable to deliver the email to the specified user (auser@gmail.com), resulting in a "user unknown" status.
Right...again, if you don't have a relay host set up, or your server is not the primary mail server for a company (that is, a domain registered, DNS, etc), then your mail has nowhere to go.
Is this your authoritative mail server, or just one that sends emails to other servers??? If so...set up a relay host. Whatever is processing the mail needs to know how to reach other domains. If this is for a business and is a new installation, you need to stop where you are and install something other than the very old CentOS 7.
Right...again, if you don't have a relay host set up, or your server is not the primary mail server for a company (that is, a domain registered, DNS, etc), then your mail has nowhere to go.
Is this your authoritative mail server, or just one that sends emails to other servers??? If so...set up a relay host. Whatever is processing the mail needs to know how to reach other domains. If this is for a business and is a new installation, you need to stop where you are and install something other than the very old CentOS 7.
I am currently experiencing a problem with my mail server, which is essential for my business operations. Despite its age, I am optimistic that there is a solution. Previously, I encountered no issues while using the same operating system with DirectAdmin installed; sending and receiving emails was seamless.
However, since removing DirectAdmin, I have encountered a new problem. Although I can still send emails without difficulty, I am unable to receive the content. I am confident that there is a resolution to this issue, and any assistance you can provide would be greatly appreciated.
I now require assistance in resolving the sending issue.
I am currently experiencing a problem with my mail server, which is essential for my business operations. Despite its age, I am optimistic that there is a solution. Previously, I encountered no issues while using the same operating system with DirectAdmin installed; sending and receiving emails was seamless.
However, since removing DirectAdmin, I have encountered a new problem. Although I can still send emails without difficulty, I am unable to receive the content. I am confident that there is a resolution to this issue, and any assistance you can provide would be greatly appreciated. I now require assistance in resolving the sending issue. updated configuration
Stop posting huge chunks of things like this without putting it in CODE tags; it makes your posts very difficult to read. And if it's 'essential to your business operation', why are you running an old system??
Your initial post said you couldn't send emails...now you're saying you CAN send emails, but can't receive them. Which is it??? Posting your configuration helps only so much, but you haven't describe the environment you're in, what other servers/firewalls/networks are in place, what you send mail through upstream, tell us if you've configured your server to be the primary server (along with DNS, MX records, etc., etc....all the things a real email server needs), or give details.
And if things WERE working and you removed something and now they're not...you have successfully identified the problem. WHY did you remove it, and why haven't you reinstalled it??
Stop posting huge chunks of things like this without putting it in CODE tags; it makes your posts very difficult to read. And if it's 'essential to your business operation', why are you running an old system??
Your initial post said you couldn't send emails...now you're saying you CAN send emails, but can't receive them. Which is it??? Posting your configuration helps only so much, but you haven't describe the environment you're in, what other servers/firewalls/networks are in place, what you send mail through upstream, tell us if you've configured your server to be the primary server (along with DNS, MX records, etc., etc....all the things a real email server needs), or give details.
And if things WERE working and you removed something and now they're not...you have successfully identified the problem. WHY did you remove it, and why haven't you reinstalled it??
Sorry, my bad i can't send and i can receive. I use old system because it's my choice please understand that. Okay thanks i will do with code tags another post. I reinstalled because it was previous configuration good for sending but bad for receiving now it's vice versa.
okay here's DNS
Code:
@ 3600 IN MX 10 mail.domain.com.
domain.com. 3600 IN TXT "v=spf1 ip4:IPV4 include:mail.domain.com -all"
_dmarc.domain.com. 3600 IN TXT "v=DMARC1; p=quarantine; rua=mailto:postmaster@domain.com; ruf=mailto:abuse@domain.com; fo=1"
I have opened all ports which needed for mail server. Here's ports:
May 11 13:35:55 mail postfix/submission/smtpd[10103]: warning: hostname IPV4.DOMAIN.COM does not resolve to address IPV4: Name or service not known
May 11 13:36:57 mail postfix/submission/smtpd[10103]: warning: hostname IPV4.DOMAIN.COM does not resolve to address IPV4: Name or service not known
May 11 13:36:57 mail postfix/submission/smtpd[10103]: connect from unknown[IPV4]
May 11 13:36:58 mail postfix/submission/smtpd[10383]: connect from mail.domain.com[SERVER_IPV4]
May 11 13:36:58 mail postfix/submission/smtpd[10383]: 25FBCF943: client=mail.domain.com[SERVER_IPV4], sasl_method=LOGIN, sasl_username=userb@domain.com
May 11 13:36:58 mail postfix/cleanup[10386]: 25FBCF943: message-id=<8817cd30513637e5165fb9184e000b3a@domain.com>
May 11 13:36:58 mail postfix/qmgr[18103]: 25FBCF943: from=<userb@domain.com>, size=648, nrcpt=1 (queue active)
May 11 13:36:58 mail postfix/submission/smtpd[10383]: disconnect from mail.domain.com[SERVER_IPV4]
May 11 13:36:58 mail dovecot: imap-login: Login: user=<userb@domain.com>, method=LOGIN, rip=SERVER_IPV4, lip=SERVER_IPV4, mpid=10391, secured, session=<+BdTOysYJKJY3pZg>
May 11 13:36:58 mail postfix/pipe[10388]: 25FBCF943: to=<usera@gmail.com>, relay=dovecot, delay=0.13, delays=0.07/0.01/0/0.05, dsn=5.1.1, status=bounced (user unknown)
May 11 13:36:58 mail postfix/cleanup[10386]: 43F8FF947: message-id=<20240511103658.43F8FF947@mail.domain.com>
May 11 13:36:58 mail postfix/bounce[10392]: 25FBCF943: sender non-delivery notification: 43F8FF947
May 11 13:36:58 mail postfix/qmgr[18103]: 43F8FF947: from=<>, size=2396, nrcpt=1 (queue active)
May 11 13:36:58 mail postfix/qmgr[18103]: 25FBCF943: removed
May 11 13:36:58 mail dovecot: imap(userb@domain.com): Logged out in=509 out=692
May 11 13:36:58 mail postfix/pipe[10388]: 43F8FF947: to=<userb@domain.com>, relay=dovecot, delay=0.07, delays=0.02/0/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
May 11 13:36:58 mail postfix/qmgr[18103]: 43F8FF947: removed
Sorry, my bad i can't send and i can receive. I use old system because it's my choice please understand that.
And you need to understand that running an old system leaves you vulnerable to security problems, and the inability to update things. There is NO REASON to, especially since Linux is free.
Quote:
Okay thanks i will do with code tags another post. I reinstalled because it was previous configuration good for sending but bad for receiving now it's vice versa.
So we're back to saying you can't send but can receive.
Quote:
okay here's DNS
Code:
@ 3600 IN MX 10 mail.domain.com.
domain.com. 3600 IN TXT "v=spf1 ip4:IPV4 include:mail.domain.com -all"
_dmarc.domain.com. 3600 IN TXT "v=DMARC1; p=quarantine; rua=mailto:postmaster@domain.com; ruf=mailto:abuse@domain.com; fo=1"
I have opened all ports which needed for mail server. Here's ports:
Not sure why you posted that, since we have no way of knowing if it's correct or not; you were asked specifically if this server was set up on the Internet, and if you've configured it to be a mail server, with a registered domain and done ALL the other many pieces you need to make a mail server function. It would seem like you have not, which is why you can't send mail. You don't have an authoritative mail server to handle unknown addresses. This:
Quote:
Logs:
Code:
May 11 13:35:55 mail postfix/submission/smtpd[10103]: warning: hostname IPV4.DOMAIN.COM does not resolve to address IPV4: Name or service not known
May 11 13:36:57 mail postfix/submission/smtpd[10103]: warning: hostname IPV4.DOMAIN.COM does not resolve to address IPV4: Name or service not known
May 11 13:36:57 mail postfix/submission/smtpd[10103]: connect from unknown[IPV4]
May 11 13:36:58 mail postfix/submission/smtpd[10383]: connect from mail.domain.com[SERVER_IPV4]
May 11 13:36:58 mail postfix/submission/smtpd[10383]: 25FBCF943: client=mail.domain.com[SERVER_IPV4], sasl_method=LOGIN, sasl_username=userb@domain.com
May 11 13:36:58 mail postfix/cleanup[10386]: 25FBCF943: message-id=<8817cd30513637e5165fb9184e000b3a@domain.com>
May 11 13:36:58 mail postfix/qmgr[18103]: 25FBCF943: from=<userb@domain.com>, size=648, nrcpt=1 (queue active)
May 11 13:36:58 mail postfix/submission/smtpd[10383]: disconnect from mail.domain.com[SERVER_IPV4]
May 11 13:36:58 mail dovecot: imap-login: Login: user=<userb@domain.com>, method=LOGIN, rip=SERVER_IPV4, lip=SERVER_IPV4, mpid=10391, secured, session=<+BdTOysYJKJY3pZg>
May 11 13:36:58 mail postfix/pipe[10388]: 25FBCF943: to=<usera@gmail.com>, relay=dovecot, delay=0.13, delays=0.07/0.01/0/0.05, dsn=5.1.1, status=bounced (user unknown)
May 11 13:36:58 mail postfix/cleanup[10386]: 43F8FF947: message-id=<20240511103658.43F8FF947@mail.domain.com>
May 11 13:36:58 mail postfix/bounce[10392]: 25FBCF943: sender non-delivery notification: 43F8FF947
May 11 13:36:58 mail postfix/qmgr[18103]: 43F8FF947: from=<>, size=2396, nrcpt=1 (queue active)
May 11 13:36:58 mail postfix/qmgr[18103]: 25FBCF943: removed
May 11 13:36:58 mail dovecot: imap(userb@domain.com): Logged out in=509 out=692
May 11 13:36:58 mail postfix/pipe[10388]: 43F8FF947: to=<userb@domain.com>, relay=dovecot, delay=0.07, delays=0.02/0/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
May 11 13:36:58 mail postfix/qmgr[18103]: 43F8FF947: removed
...says you're trying to relay things, but don't have a relay server set up...it has nowhere to go. So either that "dovecot" server you have isn't running to handle things, or you need to (AGAIN) find a relay host to shovel your mail through.
And you need to understand that running an old system leaves you vulnerable to security problems, and the inability to update things. There is NO REASON to, especially since Linux is free.
I don't want to update CentOS, and now I'm searching in this forum to find out how to solve the problem.
Quote:
Originally Posted by TB0ne
So we're back to saying you can't send but can receive.
Not sure why you posted that, since we have no way of knowing if it's correct or not; you were asked specifically if this server was set up on the Internet, and if you've configured it to be a mail server, with a registered domain and done ALL the other many pieces you need to make a mail server function. It would seem like you have not, which is why you can't send mail. You don't have an authoritative mail server to handle unknown addresses. This:
...says you're trying to relay things, but don't have a relay server set up...it has nowhere to go. So either that "dovecot" server you have isn't running to handle things, or you need to (AGAIN) find a relay host to shovel your mail through.
Yes, it's quite amusing. It could either be a case of miscommunication or perhaps you're overlooking the configuration and attributing the entire issue to the operating system simply because it's outdated.
I don't want to update CentOS, and now I'm searching in this forum to find out how to solve the problem. Yes, it's quite amusing. It could either be a case of miscommunication or perhaps you're overlooking the configuration and attributing the entire issue to the operating system simply because it's outdated.
No, it's because you're not paying attention to what's getting told to you. Not amusing in any way to keep repeating things...the fact that you can use a transport map to send to Gmail indicates things are working, but you DO NOT have a full mail server set up. That is *AGAIN* to do with MX records, DNS setup, domain registration on the Internet, and all the other pieces that go along with a mail server. You *STILL* don't tell us if this has ever worked, what the setup is, if you've done the domain registration, etc., nor if you try to set up a relay host further upstream (or have one to use). Nothing about your environment at all; you just keep repeating it doesn't work, and posting your config.
AGAIN: this is very involved, and using an old system is NOT A GOOD IDEA, because if your server is on the Internet using an old OS that can't be patched, and you're seriously going to run an email server which is VERY exposed, bad things will happen. Good luck
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.