Cant receive mail, Bounces all

15 posts / 0 new
Last post
#1 Fri, 02/09/2018 - 07:48
nygage

Cant receive mail, Bounces all

Hello, i'm new at virtualmin, i have checked the other topics and i havent found a solution for my problem, when i send an email from gmail to my server i receive the following response to my gmail:

his is the mail system at host mail.mydomain.net.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<BOUNCE@mydomain.net> (expanded from <username@mydomain.net>):
    unknown user: "bounce"

Final-Recipient: rfc822; BOUNCE@mydomain.net
Original-Recipient: rfc822;username@mydomain.net
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; unknown user: "bounce"

I dont know what can i do, i can send messages , this is my config:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
home_mailbox = Maildir/
inet_protocols = all
mailbox_command = procmail /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = $myhostname, localhost.$mydomain, $mydomain
myhostname = mail.mydomain.net
mynetworks_style = subnet
myorigin = mydomain.net
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated permit
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual

Thanks a lot

Fri, 02/09/2018 - 09:07
andreychek

Howdy,

Hmm, it sounds like there's an alias or forward that's taking email destined for the user you emailed, and then forwarding that to a user named "bounce".

What happens if you create a new email account (in Edit Users -> Add a User to this Server), and then send an email to that user? Do you experience the same problem, or does the email get delivered to that account?

Fri, 02/09/2018 - 10:25 (Reply to #2)
nygage

Not i dont receive any error but here you are the log of the server:

Feb  9 17:15:09 mydomain postfix/smtpd[24527]: connect from mail-ua0-f172.google.com[209.85.217.172]
Feb  9 17:15:10 mydomain postfix/smtpd[24527]: 589EF120C8E: client=mail-ua0-f172.google.com[209.85.217.172]
Feb  9 17:15:10 mydomain postfix/cleanup[24530]: warning: 589EF120C8E: unreasonable virtual_alias_maps result testuser.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.tecno... -- message not accepted, try again later
Feb  9 17:15:10 mydomain postfix/smtpd[24527]: disconnect from mail-ua0-f172.google.com[209.85.217.172] ehlo=2 starttls=1 mail=1 rcpt=1 data=0/1 quit=1 commands=6/7

Thanks

Solved the conectivity problem, now i have this error: Recipient address rejected: User unknown in local recipient table. It are users of the virtual server. Other problem like the first one

Fri, 02/09/2018 - 13:08
andreychek

Hmm, would it be possible to post the contents of your /etc/postfix/virtual file? It's starting to sound like there may be something unusual inside of it.

Fri, 02/09/2018 - 13:17 (Reply to #4)
nygage

Here you are, thanks a lot

subdomain.mydomain.net      subdomain.mydomain.net
abuse@subdomain.mydomain.net        mydomain@mydomain.net
postmaster@subdomain.mydomain.net   mydomain@mydomain.net
hostmaster@subdomain.mydomain.net   mydomain@mydomain.net
webmaster@subdomain.mydomain.net    mydomain@mydomain.net
upload@subdomain.mydomain.net       upload.mydomain
mydomain.net  mydomain.net
testuser@mydomain.net  testuser.mydomain
Fri, 02/09/2018 - 16:12
Diabolico
Diabolico's picture

I just made quick check of your main.cf and could you try next thing - change mydestination = $myhostname, localhost.$mydomain, $mydomain to mydestination = $myhostname, localhost.$mydomain, localhost, your.hostname.tld where your.hostname.tld is your actual hostname.
Second, add inet_interfaces = all before inet_protocols = all.
Third, if your server isnt using IPv6 change inet_protocols = all to inet_protocols = ipv4.

Save and restart postfix. For now this is what i spotted, but it could be more. When i find time i can re-check again if someone else doesnt help you to solve the problem.

EDIT: Forgot to mention, always keep old file off-site just in case something goes wrong so you can quickly revert back.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Fri, 02/09/2018 - 19:45 (Reply to #6)
nygage

Thanks for your reply, i have made the changes but the error is the same that in the last messsage i post.

Sat, 02/10/2018 - 04:51
Diabolico
Diabolico's picture

Can you create new email user for any domain on your server and then send email to that user?

Virtualmin -> Edit users -> Add a user to this server -> .... -> Other user permissions -> Email only

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Sat, 02/10/2018 - 05:04 (Reply to #8)
nygage

Same error, here you are:

Feb 10 12:01:50 mydomain postfix/smtpd[14741]: 803C311EEEF: client=mail-ua0-f175.google.com[209.85.217.175]
Feb 10 12:01:50 mydomain postfix/cleanup[14785]: warning: 803C311EEEF: unreasonable virtual_alias_maps result testuser.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain.mydomain... -- message not accepted, try again later
Sat, 02/10/2018 - 08:23
Diabolico
Diabolico's picture

Did you send to testuser mail account or you created new user and send the email to that user? I'm asking because i see you already had testuser mail account.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Sat, 02/10/2018 - 15:47 (Reply to #10)
nygage

I have deleted the account and i've created it for this new test

Tue, 02/13/2018 - 10:27
nygage

Anyone can helps me please?

Thu, 02/15/2018 - 17:36
nygage

Hello, some news, @Diabolico, i can send mail to root@mydomain.net and it not gives any error but the mail is not show at the webmail. The virtual users, same error

Fri, 02/16/2018 - 09:21
Diabolico
Diabolico's picture

I was thinking that someone will jump in as i had really busy week. Later i will try to find some time and give you the link for default Postfix *.conf files so we can start from there. The error output is definatelly strange and could be many things, from miss-configured *.conf files to something else.

Just one question, can you post the users with email accounts and no need for the real names. Its enough to say user1, user2... etc and under each user post the main email and connected aliases for that account (if there is any). If you have more than one domain then make it clear, like domain1, domain2. Last copy/paste (again) the content of your virtual file using same rules as mentioned before (user1, user2... domain1, domain2... etc).

Then later or tomorrow i will check everything and in mean time you can try with default *.conf files just to exclude there is some problem with that. Because if you get different type of error then the problem could be with *.conf files and no need to search elsewhere.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Sat, 02/17/2018 - 03:19 (Reply to #14)
nygage

Thanks for your help, the virtual file content is this, but i dont know where can i found virtual aliases, in the file only the last users i create have a entry

subdomain.domain.net subdomain.domain.net
abuse@subdomain.domain.net tecnoofilia@domain.net
postmaster@subdomain.domain.net tecnoofilia@domain.net
hostmaster@subdomain.domain.net tecnoofilia@domain.net
webmaster@subdomain.domain.net tecnoofilia@domain.net
upload@subdomain.domain.net upload.domain
domain.net domain.net
testuser@domain.net testuser.domain
user1@domain.net user1.domain

Thanks