Email Rejected

17 posts / 0 new
Last post
#1 Sun, 09/13/2015 - 09:22
daniel7558

Email Rejected

Hi, I got problems with incoming emails. They are not accepted somehow. I already checked the /etc/log/mail.log (Ubuntu System) and found a error corrosponding with a test email I just sent myself.

Sep 13 10:06:33 djp-web postfix/smtpd[2044]: connect from mail-wi0-f172.google.com[209.85.212.172]
Sep 13 10:06:33 djp-web postfix/smtpd[2044]: NOQUEUE: reject: RCPT from mail-wi0-f172.google.com[209.85.212.172]: 454 4.7.1 <email@domain.tld>: Relay access denied; from=<myemail@gmail.com> to=<email@domain.tld> proto=ESMTP helo=<mail-wi0-f172.google.com>
Sep 13 10:06:33 djp-web postfix/smtpd[2044]: disconnect from mail-wi0-f172.google.com[209.85.212.172]

Where do you think is the problem and how can I solve it?

Best wishes, Daniel

Sun, 09/13/2015 - 13:27
Diabolico
Diabolico's picture

454 4.7.1 relay access denied

This means postfix doesnt know where to send incoming emails. Check main.cf and mydestination you should have there valid fully qualified domain name or host name.

More info here: http://www.postfix.org/postconf.5.html

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

Sun, 09/13/2015 - 16:04
daniel7558

Thanks so far :) I checked that and I'm getting this error now:

Sep 13 16:49:56 hostname.tld postfix/cleanup[20030]: warning: 411BA1245DB: unreasonable virtual_alias_maps map nesting for email@domain.tld -- message not accepted, try again later
Sun, 09/13/2015 - 16:48
Diabolico
Diabolico's picture

This is my mydestination:

mydestination = $myhostname, localhost.$mydomain, localhost, this-is.my-hostname.tld

Ofc you should change "this-is.my-hostname.tld" to what is your hostname. If this doesnt work then you should post here what is your OS, postfix version with log files little longer than just one line as im sure the error did not show up only with that line. Then someone can check what could be wrong.

Just keep in mind that "this-is.my-hostname.tld" must be fqdn.

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

Sun, 09/13/2015 - 17:33
daniel7558

Well, still got some problems with it or I just don't get it right.

mydestination = hostname.tld, localhost.domain.tld domain.tld

is now in main.cf. Where hostename.tld is the fqdn and domain.tld is a domain on which I would need to receive e-mail. I also tried replacing domain.tld with the hostname and some other arrangements. None of them work.

Whenever I send an email to the server I get this error in the error logfile:

Sep 13 18:21:17 domain postfix/smtpd[24111]: 112B91245DB: client=mail-wi0-f179.google.com[209.85.212.179]
Sep 13 18:21:17 domain postfix/cleanup[24183]: warning: 112B91245DB: unreasonable virtual_alias_maps map nesting for user@domain.tld -- message not accepted, try again later
Sep 13 18:21:17 domain postfix/smtpd[24111]: disconnect from mail-wi0-f179.google.com[209.85.212.179]

And there are no other error messages.

I'm running Ubuntu 14.04 64bit and Postix 2.11.0.

Sun, 09/13/2015 - 21:12
Diabolico
Diabolico's picture

Copy exactly how i posted here:

mydestination = $myhostname, localhost.$mydomain, localhost, XXXXXXXXXXXX

and only what you should change is X and instead put your hostname, e.g. "this-is.your-hostname.tld".

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

Mon, 09/14/2015 - 05:50
daniel7558

So I copied that and replaced XXXXX with my hostname - doesn't work. Then I added other domains at the end and didn't work either.

After every change I reload with postfix reload.

Mon, 09/14/2015 - 14:33
Diabolico
Diabolico's picture

Sadly i my prim OS is Centos so i'm not so familiar with Ubuntu. Best is to post log files and your main.cf and master.cf and see if someone can help you. Other solution is to ask Ubuntu community, usually they are quick and helpful but still you will need to provide your logfile with main/master.cf.

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

Mon, 09/14/2015 - 15:55
andreychek

Howdy,

What is the output of this command:

postconf -n

Tue, 09/15/2015 - 06:01
daniel7558

Ok, so here are the non default parameters:

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
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = $myhostname, localhost.$mydomain, localhost, djp-web.de, pa-galli.de
myhostname = djp-web.de
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
sender_bcc_maps = hash:/etc/postfix/bcc
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 reject_unauth_destination
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
Tue, 09/15/2015 - 09:20
andreychek

Okay, that appears to be correct... you may want to review /etc/postfix/virtual, and there, review the references for this particular account.

The error you're getting suggests that there may be a problem in that virtual file with the references to that particular user.

-Eric

Tue, 09/15/2015 - 10:31
daniel7558

I had a look at that file and I couldn't find an error in it. I just had a lot of entries like:

domain.tld   domain.tld
user@domain.tld   some.other.email@gmail.com
domain.tld   [name of corrosponding unix user]
user@domain.tld   [name of corrosponding unix user]
@domain.tld   some.other.email@gmail.com  

I found

redirection@domain.tld   redirection-domain.tld

which felt weird because of the dash instead of the dot. I commented that out but the problem still exists after reloading postfix.

EDIT: The problem does not exist with one particular user. I cannot receive emails for all accounts and domains.

Thu, 09/24/2015 - 12:05
andreychek

Since you're seeing a problem with all accounts/domains -- maybe instead of reinstalling Postfix, as you mentioned in another Forum thread, you could instead try disabling the "Mail for Domain" feature in all Virtual Servers.

Then, verify that the "virtual" file here is empty.

Once it is empty, then re-enable the Mail for Domain feature.

That will re-generate all the entries in that file.

I'm curious if doing that allows email to start working again.

-Eric

Mon, 04/29/2019 - 02:50 (Reply to #13)
Jfro

Here same kind of problem. please read bottom note

Thanks Eric this disabling enabling worked does anyone know reason? While entries look the same after.

When problem was there the smtp header sending used as should ipv6 hostname adress, after disable enable then the ipv4 is in smtp header when sending out.

So maybe a conflicting part wen configuring ipv6 for postfix and settings are saved, though sending mails worked, ????

only receiving then

For alias virtualserver users it still doesn't work still also with new users status=bounced (User unknown in virtual alias table)

Problem exist if you use for the hostname as alias virtualmin server with mail. ( disable mail for "hostname alias" and then this problem is solved) Don't know if this is in HOWTO WIKI or DOCU? (is looping in such config setting)

Thu, 09/24/2015 - 12:43
daniel7558

I disabled email, maillist, spam and virus filter on all domains (as you have to disable all email related in order to disable email). But I have one virtual server where I cannot deactivate email.

This server is called 144139361420765 and one day it just appeard out of nowwhere. I cannot delete, change anything as it always tells me that email/domain/something is wrong. This server has absolutly no configuration and every possible form field is empty. I simply deactivated this one and I wanted to solve this problem after my email problem is solved :)

I don't think that this is in any connection to the email problem because this server appeared before there was trouble with the emails.

Ok, after deactivating the email for domain feature on the servers the "virtual" file is empty. When I activate the feature again it adds a row.

domain.tld domain.tld

This row is not correct as Mike pointed out in the askubuntu thread.

BTW: Here is the link to the askubuntu forum for users that don't got here by the other thread: http://askubuntu.com/questions/676625/postfix-email-rejected/

Thu, 09/24/2015 - 13:10
andreychek

Howdy,

Yeah, we can ignore that domain with just numbers for the moment.

As for Postfix -- that is actually what you want... that line is expected.

Is that all you see in the virtual file? Just that one line?

Also, does this particular domain have any email accounts?

-Eric

Mon, 09/28/2015 - 14:40
daniel7558

Hi there, sorry for the late reply.

So email is working again :) Deactivating and reactivating everything solved it. There is just the problem that the emails of another account/domain are saved to my email account. I double checked the configuration in Virtualmin. There is only the "master" user and one additional user. I tried to send an email to this additional user and it ended up in my mailbox. I had a look in the virtual file, too. The email of that user maps correctly to the unix user.

From the mail.log I found out that the email was redirected to the main hostname account email (which redirects again to my personal but this is ok). I just went with disabling email for this domain and now everything is redirected etc. correctly.

So, thanks for your support and I guess I'll open up a new thread when I'll need to use email for the disabled domain :'D

Daniel

Topic locked