Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
maildrop
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
maruscya
Guru
Guru


Joined: 13 Aug 2004
Posts: 507

PostPosted: Mon Oct 29, 2007 3:07 pm    Post subject: maildrop Reply with quote

Ciao a tutti

Da qualche tempo sto configurando una macchina con postfix, mailscanner e accessori vari...

Devo gestire dei domini virtuali, tutte le informazioni sono archiviate dentro mysql. Tutto funziona bene l'unico punto che mi rimane da configurare e' maildrop.
Dopo diversi tentativi, ora le email vengono deliverate localmente attraverso maildrop. Ho creato dei filtri ma non riesco a farli funzionare in modo corretto.

Ho fatto qualche banale prova ma senza risultato. Sono quindi qui a chiedere il vostro aiuto su come fare un filtro per maildrop funzionante.
Ecco un po' di dati.

/etc/maildroprc, dovrebbe contenere la configurazione generale per maildrop, inoltre i messaggi che contengono "andrea" nel mittente dovrebbero essere spostati in .maildir/personal . Il file qui sotto l'ho copiato da un'altro sito web, l'unica modifica fatta e' la regola che sposta i msg in personal

Code:

SHELL="/bin/bash"
DEFAULT = "$HOME/.maildir"
MAILDIR = "$HOME/.maildir"

logfile "$HOME/.getmail/.maildrop.log"

# Markers for the log file
#
log "Markers:   ---------------------------------------------"
log " (**) from config file, (II) informational, (WW) warning"
log "--------------------------------------------------------"
log ""

#####################################################################
#
#  Correcting wrong signature dashes
#

if (/^--($|[ ]{2,}^)/:b)
        {
                xfilter "sed -r 's/^--($|[ ]{2,}^)/-- /'"
                        log "(II) Sig Dashes corrected"
                                }


#''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# .Personal
#
if ( /^From:.*(andrea|friend_2|friend_3)/ )
{
    exception {
                to $DEFAULT/.Personal/
                                }
}



# Include any rules set up for the user - this gives the
#   administrator a way to override the domain's mailfilter file
#
#   this is also the "suggested" way to set individual values
#   for maildrop such as quota. (why do you need quota on your own PC?)
#

`test -r $HOME/.mailfilter`
if( $RETURNCODE == 0 )
        {
                log "(==)  Including $HOME/.mailfilter"
                                exception {
                                                        include $HOME/.mailfilter
                                          }
        }



Quando arriva un msg per l'utente viene passato a mail drop da postfix, ecco cosa riporta postfix al momento del delivery del messaggio

Code:

Oct 29 16:00:48 mailhouse postfix/qmgr[28358]: 88E92106B20: from=<andrea*****@virgilio.it>, size=1962, nrcpt=1 (queue active)
Oct 29 16:00:48 mailhouse postfix/pipe[11272]: 88E92106B20: to=<andreab@g*****.com>, relay=maildrop, delay=1.1, delays=0.94/0.01/0/0.14, dsn=2.0.0, status=sent (delivered via maildrop service)
Oct 29 16:00:48 mailhouse postfix/qmgr[28358]: 88E92106B20: removed


Nella home dell' utente viene generato in modo corretto il file di log. Ed ecco il suo contento

Code:

Markers:   ---------------------------------------------
 (**) from config file, (II) informational, (WW) warning
--------------------------------------------------------

(==)  Including /home/vmail/g******.com/andreab/.mailfilter
Date: Mon Oct 29 16:00:48 2007
From: AndreA <andrea******@virgilio.it>
Subj: test
File: /home/vmail/g******.com/andreab/.maildir                       (1989)



Quindi mi sembra di capire che il messaggio sia arrivato in modo corretto a maildrop e correttamente processato. Il problema e' che il messaggio non e' stao messo in .maildir/personal, ma in .maildir/ e basta.
Il filtro impostato nel file generale non ha funzionato come dovrebbe.

Nel file /etc/maidroprc specifica anche l'uso delle regole per il singolo utente, dovrebbe essere richiamato il file ~HOME/.mailfilter, che nel mio caso non e' altro che la regola per spostare i msg in personal.

Anche mettendo nel file .mailfilter la regola, il msg rimane sempre in .maildir.. :(


Dove sto sbagliando ??




AndreA
Back to top
View user's profile Send private message
Yoghi
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2004
Posts: 120
Location: Bologna - italy

PostPosted: Wed Oct 31, 2007 10:56 pm    Post subject: Reply with quote

Code:

to "$MAILDIR"

nel senso che penso tu debba mettere i doppi apici, per lo meno cosi a me funziona.
Back to top
View user's profile Send private message
maruscya
Guru
Guru


Joined: 13 Aug 2004
Posts: 507

PostPosted: Thu Nov 01, 2007 5:04 pm    Post subject: Reply with quote

Yoghi wrote:
Code:

to "$MAILDIR"

nel senso che penso tu debba mettere i doppi apici, per lo meno cosi a me funziona.


Scusa... ma non capisco.

Potresti postare il tuo file di configurazione ??!?

intanto grazie per la risposta
Back to top
View user's profile Send private message
MeMyselfAndI
l33t
l33t


Joined: 15 Nov 2005
Posts: 784
Location: Between the monitor and the chair

PostPosted: Thu Nov 01, 2007 6:25 pm    Post subject: Reply with quote

Penso ce intenda che devi mettere
Code:
 $DEFAULT/.Personal/
tra ""
Back to top
View user's profile Send private message
Yoghi
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2004
Posts: 120
Location: Bologna - italy

PostPosted: Thu Nov 01, 2007 6:52 pm    Post subject: Reply with quote

si esatto intendevo quello che ha detto MeMyselfAndI
Back to top
View user's profile Send private message
maruscya
Guru
Guru


Joined: 13 Aug 2004
Posts: 507

PostPosted: Thu Nov 01, 2007 8:16 pm    Post subject: Reply with quote

Yoghi wrote:
si esatto intendevo quello che ha detto MeMyselfAndI




Ora provo ... :)

Scusate, ma proprio non capivo :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum