• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Was machen diese UCE restrictions in der master.cf ???

Status
Für weitere Antworten geschlossen.

Trexter

Newbie
==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - 50 smtpd -o content_filter=smtp:[localhost]:10024
#mit diesem Eintrag wird Postfix dazu gebracht, dass alle eingehenden Mail über SMTP
#weitergeleitet werden an den Port 10024 des localhost.
#darunter die Zeile in Originalversion
#smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
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
relay unix - - - - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
localhost:10025 inet n - y - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.1/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000

smtp-amavis unix - - y - 50 smtp
-o smtp_data_done_timeout = 120
#
# #######

So ist alles in Ordnung und die Mails werden zugestellt:
root@mail:/home/oe# tail -f /var/log/mail.info
Mar 10 20:43:29 mail postfix/smtpd[3887]: connect from localhost.localdomain[127.0.0.1]
Mar 10 20:43:29 mail postfix/smtpd[3887]: 172BA13405F: client=localhost.localdomain[127.0.0.1]
Mar 10 20:43:29 mail postfix/cleanup[3883]: 172BA13405F: message-id=<200503102043.28333.oe@mueller-sohn.de>
Mar 10 20:43:29 mail postfix/qmgr[3787]: 172BA13405F: from=<oe@mueller-sohn.de>, size=1001, nrcpt=1 (queue active)
Mar 10 20:43:29 mail postfix/smtpd[3887]: disconnect from localhost.localdomain[127.0.0.1]
Mar 10 20:43:29 mail amavis[2868]: (02868-01) Passed, <oe@mueller-sohn.de> -> <root@mueller-sohn.de>, Message-ID: <200503102043.28333.oe@mueller-sohn.de>, Hits: -
Mar 10 20:43:29 mail postfix/smtp[3884]: D473813405E: to=<root@mueller-sohn.de>, relay=localhost[127.0.0.1], delay=1, status=sent (250 2.6.0 Ok, id=02868-01, from MTA: 250 Ok: queued as 172BA13405F)
Mar 10 20:43:29 mail postfix/qmgr[3787]: D473813405E: removed
Mar 10 20:43:29 mail postfix/local[3888]: 172BA13405F: to=<oe@mail.mueller-sohn.de>, orig_to=<root@mueller-sohn.de>, relay=local, delay=0, status=sent (delivered to command: procmail -a "$EXTENSION")
Mar 10 20:43:29 mail postfix/qmgr[3787]: 172BA13405F: removed



Lasse ich jedoch die restrictions weg:


# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - 50 smtpd -o content_filter=smtp:[localhost]:10024
#mit diesem Eintrag wird Postfix dazu gebracht das alle eingehenden Mail über SMTP
#weitergeleitet werden an den Port 10024 des localhost.
#darunter die Zeile in Originalversion
#smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
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
relay unix - - - - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
localhost:10025 inet n - y - - smtpd
smtp-amavis unix - - y - 50 smtp
-o smtp_data_done_timeout = 120
#
# Interfaces to non-Postfix software. Be sure to examine the
# #########################


Dann:



Mar 10 20:45:31 mail postfix/postfix-script: stopping the Postfix mail system
Mar 10 20:45:31 mail postfix/master[3067]: terminating on signal 15
Mar 10 20:45:32 mail postfix/postfix-script: starting the Postfix mail system
Mar 10 20:45:32 mail postfix/master[4036]: daemon started -- version 2.1.5
Mar 10 20:45:50 mail postfix/smtpd[4054]: connect from mail.mueller-sohn.de[192.168.0.1]
Mar 10 20:45:50 mail postfix/smtpd[4054]: 9D3A013405E: client=mail.mueller-sohn.de[192.168.0.1]
Mar 10 20:45:50 mail postfix/cleanup[4057]: 9D3A013405E: message-id=<200503102045.50428.oe@mueller-sohn.de>
Mar 10 20:45:50 mail postfix/qmgr[4038]: 9D3A013405E: from=<oe@mueller-sohn.de>, size=534, nrcpt=1 (queue active)
Mar 10 20:45:50 mail postfix/smtpd[4054]: disconnect from mail.mueller-sohn.de[192.168.0.1]
Mar 10 20:45:50 mail postfix/smtpd[4061]: connect from localhost.localdomain[127.0.0.1]
Mar 10 20:45:50 mail postfix/smtpd[4061]: BEA8713405F: client=localhost.localdomain[127.0.0.1]
Mar 10 20:45:50 mail postfix/cleanup[4057]: BEA8713405F: message-id=<200503102045.50428.oe@mueller-sohn.de>
Mar 10 20:45:50 mail postfix/qmgr[4038]: BEA8713405F: from=<oe@mueller-sohn.de>, size=1004, nrcpt=1 (queue active)
Mar 10 20:45:50 mail postfix/smtpd[4061]: disconnect from localhost.localdomain[127.0.0.1]
Mar 10 20:45:50 mail amavis[2869]: (02869-01) Passed, <oe@mueller-sohn.de> -> <root@mueller-sohn.de>, Message-ID: <200503102045.50428.oe@mueller-sohn.de>, Hits: -
Mar 10 20:45:50 mail postfix/smtp[4058]: 9D3A013405E: to=<root@mueller-sohn.de>, relay=localhost[127.0.0.1], delay=0, status=sent (250 2.6.0 Ok, id=02869-01, from MTA: 250 Ok: queued as BEA8713405F)
Mar 10 20:45:50 mail postfix/qmgr[4038]: 9D3A013405E: removed
Mar 10 20:45:50 mail postfix/smtp[4062]: fatal: parameter smtp_data_done_timeout: bad time unit:
Mar 10 20:45:51 mail postfix/master[4036]: warning: process /usr/lib/postfix/smtp pid 4062 exit status 1
Mar 10 20:45:51 mail postfix/master[4036]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
Mar 10 20:46:51 mail postfix/smtp[4064]: fatal: parameter smtp_data_done_timeout: bad time unit:
Mar 10 20:46:52 mail postfix/master[4036]: warning: process /usr/lib/postfix/smtp pid 4064 exit status 1
Mar 10 20:46:52 mail postfix/master[4036]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
Mar 10 20:47:52 mail postfix/smtp[4066]: fatal: parameter smtp_data_done_timeout: bad time unit:
Mar 10 20:47:53 mail postfix/master[4036]: warning: process /usr/lib/postfix/smtp pid 4066 exit status 1
Mar 10 20:47:53 mail postfix/master[4036]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
Mar 10 20:48:53 mail postfix/smtp[4074]: fatal: parameter smtp_data_done_timeout: bad time unit:
Mar 10 20:48:54 mail postfix/master[4036]: warning: process /usr/lib/postfix/smtp pid 4074 exit status 1
Mar 10 20:48:54 mail postfix/master[4036]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling









Ich hatte es bisher so Verstanden, dass man mit den Restictions SPAM und Authentifizierung etc. regelt und zwar in der main.cf. Kann mir jemand erklären was diese restrictions in der master.cf machen? Wieso wird dadurch (durch das weglassen) die postfix <->amavis Kommunikation getört???

Vielen Dank im Voraus.
 
OP
T

Trexter

Newbie
Amavis schickt die Mail nach dem Untersuchen zurück an Postfix,
allerdings nicht über den SMTP-Port 25, sondern über Port 10025 (du
hast da oben eine "0" zu viel, so viele Ports gibt es gar nicht).
Das muss so sein, damit Postfix zwischen neuem und bereits gescannten
Mails unterscheiden kann. Damit Postfix aber auch Mails auf Port
10025 annimmt, muss es in der master.cf wiederum eingetragen sein -
jetzt mit der Besonderheit, dass der Standard-Content_Filter aus der
main.cf überschriben wird mit nix (also "content_filter= ").


Gefundene Quelle:
http://lists.suse.com/archive/suse-linux/2004-May/0893.html

Also eine "verschachtelte", kleine main.cf für port 10025, die für Mails gelten, die postfix nicht von port 25 sondern eben von port 10025 annimmt. Die vorangegangenen restrictions aus der main.cf sind ja bereits "durchlaufen", ansonsten wäre die Mail ja erst gar nicht bis hierhin gekommen.
Ich denke, dass das mit den "too many hops" dadurch erzeugt wurde, dass eben "content_filter = smtp-amavis:[127.0.0.1]:10024" aus der main.cf immer noch Gültigkeit hatte, wenn postfix an Port 10025 mails von amavis annahm. Dadurch bekam ich eine endlosschleife, wo die Mails immer wieder an amavis übergeben wurden. Habe jetzt die ganzen restrictions, die mich irritierten rausgenommen und nur "content_filter= " belassen, das Ganze funktioniert jetzt wie erwartet. *puuhh*
 
Status
Für weitere Antworten geschlossen.
Oben