[postfix-users] Dynamische Empfängerverifikation mit Dovecot

Robert Schetterer robert at schetterer.org
Mo Mai 9 17:25:11 CEST 2011


Am 09.05.2011 17:12, schrieb Robert Schetterer:
> Am 09.05.2011 15:51, schrieb Robert Schetterer:
>> Am 09.05.2011 13:50, schrieb Jan Phillip Greimann:
>>> Am 09.05.2011 12:56, schrieb Robert Schetterer:
>>>> bei einem normalen mailserver
>>>> mit dovecot auf der gleichen/lokalen maschine
>>>> und zb dovecot lmtp ist das eigentlich unnoetig
>>>> die empfaenger adressen und domains hab ich zb in mysql
>>>> daraus bedient sich dovecot und postfix
>>> Genau das ist der Knackpunkt. Wieso die Daten doppelt abfragen?
>>
>> sorry ich kann dir nicht mehr folgen
>> wiso denn nun doppelt...?
>> das erscheint mir dann eher eine Frage des Setups
>>
>>  Das ist
>>> nur unnötige Last für die Datenbank.
>>
>> aehm proxy:mysql bei postfix ?
>> also meine Datenbanken stecken das locker weg, im Zweifelsfall
>> wuerde ich dann mit eher statischen tables arbeiten, koennten man ja
>> auch bei Bedarf aus der Datenbank erstellen, wenn zb ein user/domain
>> erstellt wird, sich aendert usw
>>
>>  Außerdem speichert Postfix das
>>> Ergebnis zwischen, welches noch weniger Last für die Datenbank bedeutet
>>> (gerade bei nicht vorhandenen E-Mail-Adressen).
>>
>>
>> soweit dringen die wenigsten vor bei mir
>> die meisten bots etc scheitern schon viel weiter vorn
>>
>>  Bei großen
>>> Mail-Server-Strukturen, wo mehrere Empfänger-MX eingetragen sind, werden
>>> proportional zur Anzahl der Server Datenbank-Anfragen vermieden und auch
>>> bei DoS-Attacken ist so etwas Gold wert.
>>
>> postfix anvil...?, fail2ban, greylisting, selctive rbls , postscreen,
>> firewalls  sollten ausreichend sein ,zumindest bei mir
>>
>>
>>>
>>>> aber das subject verwirrt mich ohne hin wie soll das gemeint sein
>>>> dynamische empfaenger ( fallen die vom Himmel ?...*g )
>>> Okay, der Subject ist ein wenig missverständlich. Stimme ich zu.
>>>
>>>> wie waere es mit zb
>>>> reject_unlisted_recipient
>>> Klar gibt es auch alternativen, wäre ja auch schlecht wenn nicht. :-) Im
>>> Grunde ist ja jeder Mail-Server irgendwie ein Individuum.
>>>
>>> _______________________________________________
>>> postfix-users mailing list
>>> postfix-users at de.postfix.org
>>> http://de.postfix.org/cgi-bin/mailman/listinfo/postfix-users
>>
>> kurz und gut ich hab wahrlich grosses setups am laufen ( 5000 user usw
>> ), es erschliesst mir nicht wozu ich da ein verify brauchen sollte,
>> ausser wie schon erwaehnt, man hat relays davor ( aber selbst da wuerde
>> ich wohl andere Verfahren bevorzugen)
>>
>> im Normalfall braucht es sowas nicht
>> aber bitte ,sicher kann man sowas basteln , aber wenn man es
>> unnoetigerweise kompliziert macht ,fuehrt es halt dann auch zu Fehlern
>> und einen solcher ist ja wohl der Anlass deiner Frage
>> meine Antwort darauf du brauchst kein verify
>> und einen zwingenden Zusammenhang mit dovecot der relevant waere kann
>> ich real nicht erkennen
>>
> 
> danke fuer deine offlist mail, der vollstaendigkeit halber
> 
> jetzt hab ich verstanden worauf ihr euch bezieht
> und es es ist wirklich ein tricky Verfahren !!!
> 
> wobei ich sagen wuerde das es nicht unbedingt einen perfomance Vorteil
> bringt, wenn man die zb mysql abfrage mit proxy macht
> 
> sollte aber die config erheblich vereinfachen wenn zb gar keine
> datenbank hat oder will
> 
> http://wiki2.dovecot.org/LDA/Postfix
> 
> Dynamic address verfication with LMTP
> 
> With Dovecot 2.0 you can also use LMTP and the Postfix setting
> "reject_unverified_recipient" for dynamic address verification. It's
> really nice because Postfix doesn't need to query an external datasource
> (MySQL, LDAP...). Postfix maintain a local database with existing/non
> existing addresses (you can configure how long positive/negative results
> should be cached).
> 
> To use LMTP and dynamic address verification you must first get Dovecot
> working. Then you can configure Postfix to use LMTP and set
> "reject_unverified_recipient" in the smtpd_recipient_restrictions.
> 
> On every incoming email Postfix will probe if the recipient address
> exists. You will see similar entries in your logfile
> 
> nur das hier sollte man beachten
> 
> Info: you can not use "reject_unverified_recipient" with "pipe" so this
> doesn't work with the Dovecot LDA "deliver".

wenn sich das nur auf dovecot deliver postfix  pipe bezieht als lda
sollte es zumindest bei Quota Warnings
kein Problem sein

> 
> evtl wird das ein Problem ( dh bin mir nicht sicher)
> wobei ich nicht ausschliessen moechte das es da einen Workaround gibt
> 
> 
> bei
> http://wiki2.dovecot.org/Quota/Configuration
> 
> Quota warnings
> 
> You can configure Dovecot to run an external command when user's quota
> exceeds a specified limit. Note that the warning is ONLY executed at the
> exact time when the limit is being crossed, so when you're testing it
> you have to do it by crossing the limit by saving a new mail. If
> something else besides Dovecot updates quota so that the limit is
> crossed, the warning is never executed. The syntax is:
> 
> quota_warning = <limit configuration> <quota-warning socket name>
> <parameters>
> #quota_warning2 = ...
> #quota_warning3 = ..etc..
> 
> Limit configuration is the exact same as for rules. Usually you want to
> use percents instead of absolute limits. Only the command for the first
> exceeded limit is executed, so configure the highest limit first. The
> actual commands that are run need to be created as services.
> 
> An example configuration:
> 
> plugin {
>   quota_warning = storage=95%% quota-warning 95 %u
>   quota_warning2 = storage=80%% quota-warning 80 %u
> }
> 
> service quota-warning {
>   executable = script /usr/local/bin/quota-warning.sh
>   # use some unprivileged user for executing the quota warnings
>   user = vmail
>   unix_listener quota-warning {
>   }
> }
> 
> With the above example when user's quota exceeds 80%, quota-warning.sh
> is executed with parameter 80. The same goes for when quota exceeds 95%.
> If user suddenly receives a huge mail and the quota jumps from 70% to
> 99%, only the 95 script is executed.
> 
> You have to create the quota-warning.sh script yourself. Here is an
> example that sends a mail to the user:
> 
> #!/bin/sh
> PERCENT=$1
> USER=$2
> cat << EOF | /usr/local/libexec/dovecot/dovecot-lda -d $USER -o
> "plugin/quota=maildir:User quota:noenforcing"
> From: postmaster at domain.com
> Subject: quota warning
> 
> Your mailbox is now $PERCENT% full.
> EOF
> 
> 
> 
> 


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Mehr Informationen über die Mailingliste postfix-users