Page 1 of 1

test email existance

Posted: 14 Oct 2015 09:38
by nicola.piazzi
My EFA send all emails to Exchange after analisis
But it send also email for users that do not exists
There is a way to test user existance and generate in EFA NDR reports ?

Re: test email existance

Posted: 14 Oct 2015 11:33
by DaN
Hi,

did you read viewtopic.php?f=14&t=498?

Re: test email existance

Posted: 14 Oct 2015 12:56
by nicola.piazzi
Ok, but :

1) It seeme that thhis script import usernames and not mai address
2) There is a way to not pass all domain.com to Exchange server but only mailboxes in the imported user table ?
3) There is a way that efa generate NDR not for all messages with unknown user but only for messages not classified as spam ?

Re: test email existance

Posted: 15 Oct 2015 14:51
by nicola.piazzi
I tried to populate email addresses in efa/mysql using ldap
It works but i think that it can be unstable, i have a problem retrieving too many rows

but i solved in other way

vi /etc/postfix/main.cf

Modify the row smtpd_recipient_restrictions adding reject_unverified_recipient
So postfix check mailbox existance of our mailboxex in our Exchange each time someone try to put a message

Postifix give an error 450 that is non know in RFC as Maibox Unknown so i add these two lines to give the same response as efa was the real final server

unverified_recipient_reject_code = 550
unverified_recipient_reject_reason = Casella di posta non trovata sui nostri sistemi

Re: test email existance

Posted: 17 Oct 2015 10:43
by shawniverson
:text-bravo:

Good postfix feature. I think many people would like this option.

https://github.com/E-F-A/v3/issues/218

Re: test email existance

Posted: 18 Oct 2015 12:52
by anti-spam
hi,

i give it a try, and it was not working ... The first incoming emails are ok, but suddently every valid email address are rejected ...
We have many CPanel shared hosting servers, possible that this will not work correctly in our case.
Our MailFoundry was able to cache the invalid email addresses, don't know how they did that ... :think:

Re: test email existance

Posted: 13 Dec 2019 09:57
by chris
I have populated /etc/postfix/recipient_acces with all email addresses from Exchange.

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_recipient, reject_unknown_recipient_domain, check_recipient_access hash:/etc/postfix/recipient_access, reject_unverified_recipient

Non existing recipient still goes through, adding reject at the end to smtpd_recipient_restrictions works for me:

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_recipient, reject_unknown_recipient_domain, check_recipient_access hash:/etc/postfix/recipient_access, reject_unverified_recipient, reject

2019-12-13 09:56:01 SMTP Error: The following recipients failed: email@domain.xx: : Recipient address rejected: Access denied
Message sending failed.

Re: test email existance

Posted: 13 Dec 2019 10:20
by nicola.piazzi
Chris
You dont need to do this
Is better to do an AD query to check mail existance

vi /etc/postfix/main.cf
## File di configurazione LDAP per la verifica degli email address da accettare
relay_recipient_maps = ldap:/etc/postfix/ldap_relay_recipient_maps.cf
Creare il file di configurazione che utilizza un utente ad hoc senza alcun tipo di permesso per la query :
vi /etc/postfix/ldap_relay_recipient_maps.cf
#/etc/postfix/ldap_relay_recipient_maps.cf
# Configurazione LDAP per query recipients consentiti
# Restituisce sia le email degli utenti che quelle dei gruppi
# Server
server_host = 10.1.1.120 10.1.1.121
server_port = 389
# Search on entire domain
search_base = DC=gruppocomet,DC=net
version = 3
#scope = sub
bind_dn = cometnt\efaldap
bind_pw = YOURADUSERPASSWORD
bind = yes
query_filter = (|(proxyAddresses=smtp:%s) (proxyAddresses=SMTP:%s))
result_attribute = mail