Portál AbcLinuxu, 21. prosince 2025 08:34
Posles mail a postgrey ho odmitne, posles za pet minut a postgrey ho prijme ... OK ?
Pokud je to ale tak, tak je to OK, postgrey tak funguje ..... Nejdrive je emil odmitnuty a pokud je poslan znova (za 5 min a dyl - tak je postgrey vetsinou default nastaveny) druhou stranou v nezmenene podobe (tedy novy pokus o poslani) , email je prijmuty ...
main.cf:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no smtpd_recipient_restrictions = check_policy_service inet:[127.0.0.1]:60000, permit_mynetworks, reject_unauth_destination delay_warning_time = 4h myhostname = linux.example.com. alias_maps = hash:/etc/postfix/aliases alias_database = hash:/etc/postfix/aliases transport_maps = hash:/etc/postfix/transport mydomain = example.com relay_domains = example.com mynetworks = 127.0.0.0/8 192.168.44.21/32 mailbox_size_limit = 0 proxy_interfaces = x.x.x.x inet_interfaces = all smtpd_helo_required = yes unknown_local_recipient_reject_code = 450master.cf:
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
smtpd_recipient_restrictions = check_policy_service inet:[127.0.0.1]:60000, permit_mynetworks, reject_unauth_destinationrestrikce JDOU po sobe ! (rozumej cteni pravidel ...),tzn check_policy_service musi byt posledni ... Takto:
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_policy_service inet:[127.0.0.1]:60000Protoze ty to mas obracene, tak se provede pravidlo: check_policy_service inet:[127.0.0.1]:60000 a na ostatni se uz nedostane .. Pak postgey uz pozdeji to ma ve whitelistu, tak se to chova OK Vice zde a zde
Tak je to spravne ...
Tak to ma byt
U greylistingu se muze stat, ze nektery mail server ZNOVA tu zpravu neposle (takovy mailserver je blbe nakonfigurovany, takova je ale bohuzel skutecnost), ale u normalnich systemu to MUSI byt OK ...
Nicmene doporucuji sqlgrey a je k nemu i webinterface ...
se mi to stale vraci s chybou: 450 4.7.1To "stale" asi ted znamenalo, ze se maily nedoruci uz ani po tech 5ti minutach, po kterych se ti to pred upravou main.cf preci dorucovalo ne?
Poslu si testovaci email a vrati se mi zpatky.Pokud se testovaci mail vrati s kodem 4xx, tak je to spravne.
Zkusim to jeste jednou a doruci se mi.To je normalni stav. Dulezite je, jestli se prvni mail vratil s kodem 4xx, pak uz to zalezi jenom na nastaveni mailserveru, ktery ho odesilal, zda ho bude posilat jeste jednou a pokud ano, tak za jak dlouho. V Postfixu je nastavena v defaultu hodnota 20 minut.
mydestination = $myhostname, localhost, $mydomain
relay_recipient_maps = hash:/etc/postfix/your_recipientsno a postfix pak vi o "lokalnich uzivatelich ... " a nezapomen: Note: the Exchange domains in question MUST be entered in relay_domains, and NOT in mydestination.
error:49 error name: LDAP_INVALID_CREDENTIALS error text: The wrong password was supplied or the SASL credentials could not be processed
#!/usr/bin/perl -T -w # Version 1.02 # This script will pull all users' SMTP addresses from your Active Directory # (including primary and secondary email addresses) and list them in the # format "user@example.com OK" which Postfix uses with relay_recipient_maps. # Be sure to double-check the path to perl above. # This requires Net::LDAP to be installed. To install Net::LDAP, at a shell # type "perl -MCPAN -e shell" and then "install Net::LDAP" use Net::LDAP; use Net::LDAP::Control::Paged; use Net::LDAP::Constant ( "LDAP_CONTROL_PAGED" ); # Enter the path/file for the output $VALID = "/etc/postfix/example_recipients"; # Enter the FQDN of your Active Directory domain controllers below $dc1="server.domena.local"; $dc2="server.domena.local"; # Enter the LDAP container for your userbase. # The syntax is CN=Users,dc=example,dc=com # This can be found by installing the Windows 2000 Support Tools # then running ADSI Edit. # In ADSI Edit, expand the "Domain NC [domaincontroller1.example.com]" & # you will see, for example, DC=example,DC=com (this is your base). # The Users Container will be specified in the right pane as # CN=Users depending on your schema (this is your container). # You can double-check this by clicking "Properties" of your user # folder in ADSI Edit and examining the "Path" value, such as: # LDAP://domaincontroller1.example.com/CN=Users,DC=example,DC=com # which would be $hqbase="cn=Users,dc=example,dc=com" # Note: You can also use just $hqbase="dc=example,dc=com" $hqbase="OU=Users,OU=MyBusiness,DC=domena,DC=local"; # Enter the username & password for a valid user in your Active Directory # with username in the form cn=username,cn=Users,dc=example,dc=com # Make sure the user's password does not expire. Note that this user # does not require any special privileges. # You can double-check this by clicking "Properties" of your user in # ADSI Edit and examining the "Path" value, such as: # LDAP://domaincontroller1.example.com/CN=user,CN=Users,DC=example,DC=com # which would be $user="cn=user,cn=Users,dc=example,dc=com" # Note: You can also use the UPN login: "user\@example.com" $user="CN=Administrator,CN=Users,DC=domena,DC=local"; $passwd="password";
server.domena.localtakze vyplnujeme:
# Enter the FQDN of your Active Directory domain controllers below $dc1="10.0.1.2"; # je lepsi dat IP ! pro jistotu $dc2="10.0.1.2";dale mas blbe:
$hqbase="dc=domena,dc=local";a nakonec:
$user="cn=Administrator,cn=Users,dc=domena,dc=local"; $passwd="heslo";
error:49 error name: LDAP_INVALID_CREDENTIALS error text: The wrong password was supplied or the SASL credentials could not be processedChjo, co mam kde jeste spatne ?
Please note that if the password you use contains the $ sign (and perhaps others? I am not familiar with perl really, but some characters such as $ and probably also quotes have special meaning) you will have to escape them appropriatly with the backslash or perl will complain. For exaple, if your password is: pa$$word, you would have to enter: pa\$\$word hereCely problem bylv tom, ze heslo obsahuje znak "$". Doplnil jsem pred onen znak "\" vse funguje
.
Vsem dekuji za spolupraci, za napady, za trpelivost
Tedy pokud jeste upravis toto:
unknown_local_recipient_reject_code = 554
ale proc se mu to vrati s chybou 5xx, kdyz mu to muj server zamitne s chybou 4xx, ze to ma zkusit pozdeji.
Chjo, jsem z toho uz jelen
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.