View previous topic :: View next topic |
Author |
Message |
t0mcat Tux's lil' helper
Joined: 12 Feb 2004 Posts: 111 Location: Catania, Italy
|
Posted: Sun Jan 16, 2005 3:41 pm Post subject: [help] qmail/vpopmail e utenti locali. |
|
|
dopo 36 ore di sbattimento non mi resta che postare nel forum...
ho installato correttamente qmail/vpopmail/courier-imap seguendo l'howto della documentazione.
vorrei poter gestire un unico utente che esista sia come utente di sistema che come utente virtuale di vpopmail.
ho provato di tutto ma senza riuscita.
ecco alcuni settaggi rilevanti:
ho impostato due domini virtuali, dei quali uno combacia con l'hostname FQDN.
Code: |
[14:59:37] [root@garfield]
[ ~ ]:# cat /etc/hosts
127.0.0.1 t0mcat.servebeer.com localhost garfield
[14:59:11] [root@garfield]
[ ~ ]:# hostname --fqdn
t0mcat.servebeer.com
[14:59:45] [root@garfield]
[ ~ ]:# hostname
garfield
[15:00:43] [root@garfield]
[ ~ ]:# qmail-showctl
<cut>
me: My name is t0mcat.servebeer.com.
defaultdomain: Default domain name is t0mcat.servebeer.com.
locals:
Messages for t0mcat.servebeer.com are delivered locally.
plusdomain: Plus domain name is t0mcat.servebeer.com.
rcpthosts:
SMTP clients may send messages to recipients at localhost.
SMTP clients may send messages to recipients at t0mcat.servebeer.com.
SMTP clients may send messages to recipients at fuckinios.org.
virtualdomains:
Virtual domain: t0mcat.servebeer.com:t0mcat.servebeer.com
Virtual domain: fuckinios.org:fuckinios.org
<cut>
|
qualunque email, dall'esterno o dall'interno, a x@t0mcat.servebeer.com viene mandata alla .maildir locale, anche se l'utente non fosse realmente esistente. nel qual caso ricevo errore "no_mailbox_here_by_that_name.", nonostante esista un utente virtuale corrispondente:
Code: |
[15:48:57] [root@garfield]
[ ~ ]:# vadduser pippo@t0mcat.servebeer.com asd
[15:49:04] [root@garfield]
[ ~ ]:# echo to: pippo | qmail-inject
[15:49:09] [root@garfield]
[ ~ ]:# tail /var/log/qmail/qmail-send/current
<cut>
new msg 343271
info msg 343271: bytes 227 from <root@t0mcat.servebeer.com> qp 18869 uid 0
starting delivery 5: msg 343271 to local pippo@t0mcat.servebeer.com
status: local 1/10 remote 0/20
delivery 5: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
status: local 0/10 remote 0/20
bounce msg 343271 qp 18872
end msg 343271
<cut>
|
se invece l'utente e' aggiunto come reale, la mail viene mandata nella sua {$HOME}.maildir .
Code: |
[15:59:07] [root@garfield]
[ ~ ]:# vdeluser pippo@t0mcat.servebeer.com
[15:59:12] [root@garfield]
[ ~ ]:# useradd -m pippo
[15:59:23] [root@garfield]
[ ~ ]:# echo to: pippo | qmail-inject
[15:59:29] [root@garfield]
[ ~ ]:# tail /var/log/qmail/qmail-send/current
<cut>
new msg 343271
info msg 343271: bytes 227 from <root@t0mcat.servebeer.com> qp 18911 uid 0
starting delivery 8: msg 343271 to local pippo@t0mcat.servebeer.com
status: local 1/10 remote 0/20
delivery 8: success: did_1+0+0/
status: local 0/10 remote 0/20
end msg 343271
<cut>
|
ma in questo caso non e' possibile controllare la mail con imap o pop3, perche courier-imap si autha solo con authvchkpwd e non con authpam (com'e' giusto che sia).
cio' vale solo per questo dominio.
per tutti gli altri domini virtuali funziona tutto correttamente.
Code: |
[16:04:49] [root@garfield]
[ ~ ]:# userdel -r pippo
[16:04:54] [root@garfield]
[ ~ ]:# vadduser pippo@fuckinios.org asd
[16:04:58] [root@garfield]
[ ~ ]:# echo to: pippo@fuckinios.org | qmail-inject
[16:05:15] [root@garfield]
[ ~ ]:# tail /var/log/qmail/qmail-send/current
<cut>
new msg 343271
info msg 343271: bytes 220 from <root@t0mcat.servebeer.com> qp 18974 uid 0
starting delivery 9: msg 343271 to local fuckinios.org-pippo@fuckinios.org
status: local 1/10 remote 0/20
delivery 9: success: did_0+0+1/
status: local 0/10 remote 0/20
end msg 343271
<cut>
|
e se loggo via imap/pop3 vedo correttamente il messaggio, in quanto e' salvato in /var/vpopmail/domains/fuckinios.org/pippo/.maildir
ho provato a cambiare la locazione della dir nel database di vpopmail, in modo che accedendo da imap potessi vedere la .maildir dell'utente reale, ma si presentano un sacco di problemi di permessi, perche' le mail in entrata hanno owner *utente*:users e permessi 600, quindi courier-imap che accede alla dir con owner vpopmail:vpopmail non puo' leggerle.
ho provato a cambiare i control files e l'hostname --fqdn nel seguente modo:
Code: |
[16:24:09] [root@garfield]
[ /var/qmail/control ]:# hostname --fqdn
mail.t0mcat.servebeer.com
[16:24:15] [root@garfield]
[ /var/qmail/control ]:# cat me
mail.t0mcat.servebeer.com
[16:24:17] [root@garfield]
[ /var/qmail/control ]:# cat defaultdomain
t0mcat.servebeer.com
[16:24:21] [root@garfield]
[ /var/qmail/control ]:# cat plusdomain
t0mcat.servebeer.com
[16:24:23] [root@garfield]
[ /var/qmail/control ]:# cat locals
mail.t0mcat.servebeer.com
[16:24:25] [root@garfield]
[ /var/qmail/control ]:# cat rcpthosts
localhost
t0mcat.servebeer.com
fuckinios.org
mail.t0mcat.servebeer.com
|
...e se provo a mandare una mail ad un utente che esiste sia localmente che virtualmente, ecco cosa succede:
Code: |
[16:32:02] [root@garfield]
[ ~ ]:# echo to: t0mcat@t0mcat.servebeer.com | qmail-inject
[16:32:02] [root@garfield]
[ ~ ]:# tail /var/log/qmail/qmail-send/current
<cut>
new msg 343271
info msg 343271: bytes 238 from <root@mail.t0mcat.servebeer.com> qp 19065 uid 0
starting delivery 10: msg 343271 to local t0mcat@t0mcat.servebeer.com
status: local 1/10 remote 0/20
delivery 10: success: did_1+0+0/
status: local 0/10 remote 0/20
end msg 343271
<cut>
|
(nel qual caso la mail non puo' essere letta da imap/pop3.)
Code: |
[16:32:02] [root@garfield]
[ ~ ]:# echo to: t0mcat | qmail-inject
[16:32:02] [root@garfield]
[ ~ ]:# tail /var/log/qmail/qmail-send/current
new msg 343271
info msg 343271: bytes 243 from <root@mail.t0mcat.servebeer.com> qp 19071 uid 0
starting delivery 11: msg 343271 to remote t0mcat@mail.t0mcat.servebeer.com
status: local 0/10 remote 1/20
delivery 11: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
status: local 0/10 remote 0/20
|
(dovrebbe essere mandata in locale ma invece combina un casino...)
non so piu' dove sbattere la testa.
chi mi puo' aiutare? _________________ il gattaccio
a.k.a etienne |
|
Back to top |
|
|
koma Advocate
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Sun Jan 16, 2005 4:13 pm Post subject: |
|
|
ho risolto implementando fetchmail =) del tipo l'utenre reale esiste l'utente virtuale anche fetchamil fetcha per l'utente virtuale depositando in locale ogni tot =) _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD |
|
Back to top |
|
|
t0mcat Tux's lil' helper
Joined: 12 Feb 2004 Posts: 111 Location: Catania, Italy
|
Posted: Sun Jan 16, 2005 4:24 pm Post subject: |
|
|
non credo di aver capito bene...
fetchmail fetcha le mail dell'utente virtuale e le mette nella .maildir dell'utente locale?
se cosi' fosse, a me servirebbe l'esatto contrario!
il mio problema e' che da imap/pop non posso accedere alle mail dell'utente locale, e da locale non posso accedere a quelle dell'utente virtuale!
certo potrei risolvere lasciando la dir dell'utente virtuale impostata su quella dell'utente locale, e far girare un chmod in cron che cambia i permessi in modo da poterle leggere anche da imap... ma non penso sia una soluzione appropriata! _________________ il gattaccio
a.k.a etienne |
|
Back to top |
|
|
koma Advocate
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Sun Jan 16, 2005 4:27 pm Post subject: |
|
|
non so allora, non mi sono mai preoccupato di far funzionare gli utenti reali semplicemente creavo il corrispettivo virtuale e lo leggevo col mio bel client =) _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD |
|
Back to top |
|
|
|
|
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
|
|