[fetchmail] Van een fetch gaat de mail naar verkeerde user

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
Ik heb een relatief simpele fetchmail setup. De config staat in "/etc/fetchmailrc" en niet per user in ~/.fetchmailrc. Had hier bewust voor gekozen om dat ik maar twee users heb en het overzichtelijk wil houden. Ik snap dat als ik het aan de users zelf wil overlaten, dit niet de juiste manier is.

Goed mijn probleem:
Ik heb twee users A/B voor beide users haalt fetchmail de mail op en dropt de mail af bij de MTA (mail transport agent) en die zorgt er voor dat de mail in de bijbehorende mail-dirs terecht komt (~/Maildir op mijn systeem). Dit werkt prima.
Voor USER_A:
- domain.com, example.com en gmail.com komt in ~/Maildir van USER_A
Voor USER_B:
- domain.org en example.org komt in ~/Maildir van USER_B maar gmail.com van USER_B komt in ~/Maildir van USER_A

Ik krijg er geen vinger achter wat hier fout gaat. Heeft iemand ideeën?


Hieronder mijn / etc/fetchmailrc

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Read the ISP accounts every 60 seconds
set daemon 60           # Pool evert 60 seconds
set syslog              # Log Through syslog facility
set postmaster root

set no bouncemail       # avoid loss on 4xx errors
                         # on the other hand, 5xx errors get
                         # more dangerous...

# Configure the ISP accounts (POP server, users and respective passwords)

#Example
#poll pop.sao.terra.com.br with protocol POP3:
#user "johndoe", password "pass1", is john here; #user "janedoe", password "pass2", is jane here

##########################################################################
# Hosts to pool
##########################################################################

# Defaults ===============================================================
# Set antispam to -1, since it is far safer to use that together with # no bouncemail
defaults:
timeout 60
antispam -1
batchlimit 100



# USER_A

# domain.com
poll pop.domain.com proto POP3
         user "username", with password "passwd", is USER_A here, fetchall;

# example.com
poll pop.example.com proto POP3
         user "username", with password "passwd", is USER_A here, fetchall;

# Google fetchmail
# Google changes it cert for pop3 every soft often and you will get entries like this in your mail log for fetchmail.
# fetchmail[3324]: pop.gmail.com fingerprints do not match!
# in your .fetchmailrc file you will have a line like # options fetchall flush ssl sslfingerprint 'A3:73:17:4C:34:4B:68:F7:B2:17:71:42:0D:7F:9F:33'
# To find the new fingerprint, use the following command:
# SHELL: openssl s_client -connect pop.gmail.com:995 -showcerts < /dev/null | openssl x509 -fingerprint -md5 -text | grep Fingerprint | awk -F= '{print $2}'

poll pop.gmail.com with proto POP3
         user "username" there with password "passwd" is USER_A here options fetchall flush ssl sslfingerprint "xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

         
# USER_B

# domain.org
poll pop.domain.prg proto POP3
         user "username", with password "passwd", is USER_B here, fetchall;

# example.org
poll pop.example.org proto POP3
         user "username", with password "passwd", is USER_B here, fetchall;

poll pop.gmail.com with proto POP3
         user "username" there with password "passwd" is USER_B here options fetchall flush ssl sslfingerprint "xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

Acties:
  • 0 Henk 'm!

  • ripperke
  • Registratie: Augustus 2003
  • Laatst online: 19-08 16:06

ripperke

w00t!

Ik vermoed dat de poll line unique moet zijn en dat je iets nodig zult hebben in de trend van

code:
1
2
3
poll pop.gmail.com with proto POP3
    user "username" there with password "passwd" is USER_A here options fetchall flush...
    user "username" there with password "passwd" is USER_B here options fetchall flush...

If TCP/IP handshaking was less formal, perhaps SYN/ACK would be YO/WASSUP


Acties:
  • 0 Henk 'm!

  • johnkeates
  • Registratie: Februari 2008
  • Laatst online: 04-07 16:30
Wat je wil is vanaf 1 Gmail account mail splitsen naar 2 lokale accounts. Dat kan als je het kopieert.

Als je het wil filteren en sorteren heb je een ander soort oplossing nodig.

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
ripperke schreef op dinsdag 03 juni 2014 @ 13:21:
Ik vermoed dat de poll line unique moet zijn en dat je iets nodig zult hebben in de trend van

code:
1
2
3
poll pop.gmail.com with proto POP3
    user "username" there with password "passwd" is USER_A here options fetchall flush...
    user "username" there with password "passwd" is USER_B here options fetchall flush...
Ik zal dit eens proberen. Maar verwacht het niet want heb al een dubbele pull line die werkt.

code:
1
2
3
4
poll pop.domain.com with proto POP3
    user "username account 1" there with password "passwd account 1" is USER_A here options fetchall flush...
poll pop.domain.com with proto POP3
    user "username account 2" there with password "passwd account 2" is USER_B here options fetchall flush...



johnkeates schreef op dinsdag 03 juni 2014 @ 13:24:
Wat je wil is vanaf 1 Gmail account mail splitsen naar 2 lokale accounts. Dat kan als je het kopieert.

Als je het wil filteren en sorteren heb je een ander soort oplossing nodig.
Ik wil vanaf twee verschillende Gmail accounts de mail ophalen en aan de juiste user doorgeven.

Dus zoiets als:
code:
1
2
    user "username account 1" there with password "passwd account 1" is USER_A here options fetchall flush...
    user "username account 2" there with password "passwd account 2" is USER_B here options fetchall flush...

[ Voor 16% gewijzigd door Neptunus op 03-06-2014 13:54 . Reden: Typo ]


Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
ripperke schreef op dinsdag 03 juni 2014 @ 13:21:
Ik vermoed dat de poll line unique moet zijn en dat je iets nodig zult hebben in de trend van

code:
1
2
3
poll pop.gmail.com with proto POP3
    user "username" there with password "passwd" is USER_A here options fetchall flush...
    user "username" there with password "passwd" is USER_B here options fetchall flush...
Mmmmm na wat lees werk denk ik toch dat je gelijk hebt (zie).

UPDATE:
@ripperke jij had gelijk! Thanks man.

Is het eigenlijk mogelijk om fetchmail naar de bv. root user een status te laten mailen als er een probleem is met fetchmail (vb. connection problem)?

[ Voor 13% gewijzigd door Neptunus op 03-06-2014 18:00 . Reden: URL aangepast. ]