joshuatree
Goto Top

Mail - Attachment (JPG) automatisch in Ordner verschieben

Moin,

ich habe schon vieles ausprobiert komme aber nicht mehr weiter.

Habe ein Debian Root Server, mit Postfix, Dovecote und RoundCube.
Ich habe eine Kamera die sendet per SMTP Bilder an eine eigens dafür erstelle EMail-Adresse.
Diese Bilder möchte ich gerne per Script in einen eigens dafür erstellten Ordner im Filesystem verschieben.

Dafür habe ich mir ein passendes Script gesucht und auch gefunden -> https://github.com/auino/mail-attachments-archiver

Wenn ich das Script ausführe bekomme ich folgenden Fehler

Traceback (most recent call last):
  File "./mail-attachments-archiver.py", line 65, in <module>  
    m.login(USER, PWD)
  File "/usr/lib/python2.7/imaplib.py", line 523, in login  
    raise self.error(dat[-1])
imaplib.error: [AUTHENTICATIONFAILED] Authentication failed.

In dieser Zeile im Script wird das login gemacht
# connecting to the IMAP serer
m = imaplib.IMAP4_SSL(IMAPSERVER)
m.login(USER, PWD)
# use m.list() to get all the mailboxes
m.select("INBOX") # here you a can choose a mail box like INBOX instead  

Nun habe ich versucht mit telnet localhost 143, IMAP manuell zu testen als root. Als Antwort bekomme ich immer ein: a NO [AUTHENTICATIONFAILED] Authentication failed.

Bin echt kein Linux-Freak und komme hier nicht weiter! Liegt es vielleicht daran das ich als Root dies versuche? Falls möglich wo kann ich das überprüfen? Sieht jemand eine andere Möglichkeit wie ich das lösen kann?

Wäre echt nett!
LG

Content-Key: 6922713070

Url: https://administrator.de/contentid/6922713070

Printed on: April 28, 2024 at 12:04 o'clock

Mitglied: 6247018886
6247018886 Apr 26, 2023 updated at 10:50:10 (UTC)
Goto Top
root und andere System-Accounts sind per IMAP in Dovecot per Default nicht erlaubt deswegen auch die Fehlermeldung Authentication failed.
System users used by Dovecot
By default Dovecot allows users to log in only with UID numbers 500 and above. This check tries to make sure that no-one can ever log in as daemons or other system users. If you’re using an UID lower than 500, you’ll need to change the first_valid_uid setting.
Und root hat die ID 0! Nimm also besser gleich eine Mailbox eines normalen Users, root ist tabu. Die Direktive ändern würde ich dringend vermeiden.

Works as designed!

Cheers briggs
Member: godlie
godlie Apr 26, 2023 updated at 10:47:39 (UTC)
Goto Top
Hallo,

warum lässt du das nicht gleich den Debianserver selbst machen?

https://unix.stackexchange.com/questions/178396/run-script-on-receipt-of ...

lässt sich wunderbar mit postfix selbst lösen.

grüße
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 11:04:15 (UTC)
Goto Top
Ok vestanden, vielen Dank.
Jetzt habe ich den context gewechselt mit su Cam1 und das Script welches Email und Passwort beinhaltet ausgeführt der smtp User lautet cam1@meinedomain.de. Fehlermeldung ist gleich geblieben. Der emailuser ist ja nicht zwingend der lokale Benutzer und hat rechte oder?
Member: godlie
godlie Apr 26, 2023 at 11:07:02 (UTC)
Goto Top
Hallo,

hast du denn USER u PW im Python Script überhaupt angepasst? Zeile 18,19,20

grüße
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 11:09:32 (UTC)
Goto Top
Ja und über Roundcube also das Webinterface kann ich mich damit auch anmelden und senden
Member: godlie
godlie Apr 26, 2023 updated at 11:16:24 (UTC)
Goto Top
Hallo,

ja dann heists debuggen, ich tippe auf die falsche Login Methode.
Es kann aber auch sein, dass du dich auf den Port 143 verbindendest, es aber SSL sein sollte 993.

Wie ist denn der username aufgebaut? hast du die domain dabei?

 class imaplib.IMAP4_SSL(host='', port=IMAP4_SSL_PORT, keyfile=None, certfile=None, ssl_context=None, timeout=None)¶  

IMAP4.login(user, password)

    Identify the client using a plaintext password. The password will be quoted.

IMAP4.login_cram_md5(user, password)

    Force use of CRAM-MD5 authentication when identifying the client to protect the password. Will only work if the server CAPABILITY response includes the phrase AUTH=CRAM-MD5.
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 11:34:47 (UTC)
Goto Top
Als erstes habe ich den Mail-User für meine Dömäne erstellt dieser lautet cam1@xxxxx.de als Passwort habe ich bewusst etwas ganz einfaches genommen um Tippfehler auszuschließen.

Wie packe ich das debugging an, wie bereits gesagt komme ich eigentlich aus der Windowswelt. Hier gibt es so viele log-files 🫣
Mitglied: 6247018886
6247018886 Apr 26, 2023 updated at 11:45:06 (UTC)
Goto Top
Member: godlie
godlie Apr 26, 2023 updated at 11:47:36 (UTC)
Goto Top
Hallo,

m = imaplib.IMAP4_SSL(IMAPSERVER) 
verändern zu
m = imaplib.IMAP4_SSL(imap_server, port=993)  

m.login
verändern zu
m.login_cram_md5 

eines nach dem anderen durchprobieren, mehr bleibt dir nicht übrig

grüße
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 11:53:47 (UTC)
Goto Top
Das wirft syslog raus
Apr 26 09:47:30 server1 dovecot: auth-worker(36327): sql(cam1@domain.de,127.0.0.1,<6x3Bczj6HtR/AAAB>): Password mismatch
Apr 26 09:47:32 server1 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<6x3Bczj6HtR/AAAB>
Apr 26 10:11:47 server1 dovecot: auth-worker(36327): sql(cam1@domain.de,127.0.0.1,<n3ePyjj6vuN/AAAB>): Password mismatch
Apr 26 10:11:49 server1 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<n3ePyjj6vuN/AAAB>
Apr 26 10:25:21 server1 dovecot: auth-worker(36327): sql(cam1@domain.de,127.0.0.1,<Za8W+zj6+ux/AAAB>): Password mismatch
Apr 26 10:25:23 server1 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<Za8W+zj6+ux/AAAB>
Apr 26 10:43:43 server1 dovecot: auth-worker(36327): sql(cam1@domain.de,127.0.0.1,<xkvRPDn60Ip/AAAB>): Password mismatch
Apr 26 10:45:42 server1 dovecot: imap-login: Disconnected: Inactivity (auth failed, 1 attempts in 119 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<xkvRPDn60Ip/AAAB>
Apr 26 10:54:22 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de,127.0.0.1,<ffLiYjn6FJJ/AAAB>): query: SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disableimap` = 'n' AND server_id = '1' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = 'domain.de' AND active = 'n' AND server_id = 1)  
Apr 26 10:54:22 server1 dovecot: auth-worker(49041): sql(cam1@domain.de,127.0.0.1,<ffLiYjn6FJJ/AAAB>): Password mismatch
Apr 26 10:54:24 server1 dovecot: auth: Debug: client passdb out: FAIL#0111#011user=cam1@domain.de
Apr 26 10:54:49 server1 dovecot: imap-login: Aborted login (auth failed, 1 attempts in 27 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<ffLiYjn6FJJ/AAAB>
Apr 26 11:00:01 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 11:00:01 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 11:00:01 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 11:00:01 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 11:15:01 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 11:15:01 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 11:15:01 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 11:15:01 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 11:30:02 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 11:30:02 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 11:30:02 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 11:30:02 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 11:45:02 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 11:45:02 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 11:45:02 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 11:45:02 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 12:00:01 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 12:00:01 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 12:00:01 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 12:00:01 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 12:15:02 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 12:15:02 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 12:15:02 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 12:15:02 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 12:24:46 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de,127.0.0.1,<tBUrpjr62sx/AAAB>): query: SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disableimap` = 'n' AND server_id = '1' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = 'domain.de' AND active = 'n' AND server_id = 1)  
Apr 26 12:24:46 server1 dovecot: auth-worker(49041): sql(cam1@domain.de,127.0.0.1,<tBUrpjr62sx/AAAB>): Password mismatch
Apr 26 12:24:48 server1 dovecot: auth: Debug: client passdb out: FAIL#0111#011user=cam1@domain.de
Apr 26 12:24:48 server1 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<tBUrpjr62sx/AAAB>
Apr 26 12:28:34 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de,127.0.0.1,<vTnJszr6vs9/AAAB>): query: SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disableimap` = 'n' AND server_id = '1' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = 'domain.de' AND active = 'n' AND server_id = 1)  
Apr 26 12:28:34 server1 dovecot: auth-worker(49041): sql(cam1@domain.de,127.0.0.1,<vTnJszr6vs9/AAAB>): Password mismatch
Apr 26 12:28:36 server1 dovecot: auth: Debug: client passdb out: FAIL#0111#011user=cam1@domain.de
Apr 26 12:30:01 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 12:30:01 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 12:30:01 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 12:30:01 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 12:45:02 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 12:45:02 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 12:45:02 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 12:45:02 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 12:49:23 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de,127.0.0.1,<LFUu/jr6Ot1/AAAB>): query: SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disableimap` = 'n' AND server_id = '1' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = 'domain.de' AND active = 'n' AND server_id = 1)  
Apr 26 12:49:23 server1 dovecot: auth-worker(49041): sql(cam1@domain.de,127.0.0.1,<LFUu/jr6Ot1/AAAB>): Password mismatch
Apr 26 12:49:25 server1 dovecot: auth: Debug: client passdb out: FAIL#0111#011user=cam1@domain.de
Apr 26 12:49:25 server1 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<LFUu/jr6Ot1/AAAB>
Apr 26 12:57:30 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de,127.0.0.1,<AXU+Gzv6euJ/AAAB>): query: SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disableimap` = 'n' AND server_id = '1' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = 'domain.de' AND active = 'n' AND server_id = 1)  
Apr 26 12:57:30 server1 dovecot: auth-worker(49041): sql(cam1@domain.de,127.0.0.1,<AXU+Gzv6euJ/AAAB>): Password mismatch
Apr 26 12:57:32 server1 dovecot: auth: Debug: client passdb out: FAIL#0111#011user=cam1@domain.de
Apr 26 12:57:32 server1 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<AXU+Gzv6euJ/AAAB>
Apr 26 13:00:02 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 13:00:02 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 13:00:02 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 13:00:02 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 13:07:48 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de,127.0.0.1,<y3YWQDv6oOl/AAAB>): query: SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disableimap` = 'n' AND server_id = '1' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = 'domain.de' AND active = 'n' AND server_id = 1)  
Apr 26 13:07:48 server1 dovecot: auth-worker(49041): sql(cam1@domain.de,127.0.0.1,<y3YWQDv6oOl/AAAB>): Password mismatch
Apr 26 13:07:50 server1 dovecot: auth: Debug: client passdb out: FAIL#0111#011user=cam1@domain.de
Apr 26 13:07:50 server1 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<y3YWQDv6oOl/AAAB>
Apr 26 13:15:02 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 13:15:02 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 13:15:02 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 13:15:02 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 13:30:01 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 13:30:01 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 13:30:01 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 13:30:01 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Apr 26 13:45:01 server1 dovecot: auth: Debug: master in: USER#01113#011cam1@domain.de#011service=doveadm
Apr 26 13:45:01 server1 dovecot: auth: Debug: prefetch(cam1@domain.de): passdb didn't return userdb entries, trying the next userdb  
Apr 26 13:45:01 server1 dovecot: auth-worker(49041): Debug: sql(cam1@domain.de): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = 'cam1@domain.de' OR email = 'cam1@domain.de') AND `disabledoveadm` = 'n' AND server_id = '1'  
Apr 26 13:45:01 server1 dovecot: auth: Debug: userdb out: USER#01113#011cam1@domain.de#011home=/var/vmail/domain.de/cam1#011mail=maildir:/var/vmail/domain.de/cam1/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/domain.de/cam1/.sieve
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 11:55:31 (UTC)
Goto Top
Password missmatch check ich nicht das stimmt def.
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 11:57:32 (UTC)
Goto Top
Zitat von @JoshuaTree:

Password missmatch check ich nicht das stimmt def.

OK, stop da war ein tippfehler drin oh mann
Member: godlie
godlie Apr 26, 2023 at 11:59:05 (UTC)
Goto Top
Hallo,

schau dir mal an was im log auftaucht, wenn du dich übers Webmail einloggst, ich denke dort wird kein:
Apr 26 13:07:50 server1 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<cam1@domain.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<y3YWQDv6oOl/AAAB>
auftauchen, ich tippe auf ein method=XYZ

grüße
Mitglied: 6247018886
6247018886 Apr 26, 2023 at 12:04:36 (UTC)
Goto Top
Eventuell falsches Python Character Encoding oder Passwort zu kurz(Policy?).
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 12:08:43 (UTC)
Goto Top
Hallo
Apr 26 14:04:29 server1 dovecot: imap-login: Login: user=<cam1@xxxxxx.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=64543, secured, session=<WHHLCjz65KF/AAAB>
Apr 26 14:04:29 server1 dovecot: imap(cam1@xxxxx.de)<64543><WHHLCjz65KF/AAAB>: Logged out in=90 out=953 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0

Habe eben aber aus versehen mit root das script gestartet und jetzt hat er was gemacht.

root@server:/usr/local/bin/mail-attachments-archiver# ./mail-attachments-archiver.py
<Wed, 26 Apr 2023 13:58:57 +0200 (CEST)> ["cam1" <cam1@domain.de>] :0000000Bild-SYFR0016.JPG  

aber er hat es noch nicht ins verzeichniss kopiert sieht aber schon 100x besser aus
Mitglied: 6247018886
6247018886 Apr 26, 2023 updated at 12:09:45 (UTC)
Goto Top
Zitat von @JoshuaTree:
OK, stop da war ein tippfehler drin oh mann

Echt jetzt 😠? So kann man die Leute hier auch beschäftigen ...
Member: kpunkt
kpunkt Apr 26, 2023 at 12:10:51 (UTC)
Goto Top
Zitat von @JoshuaTree:

als Passwort habe ich bewusst etwas ganz einfaches genommen um Tippfehler auszuschließen.

Tjoa....
Member: godlie
godlie Apr 26, 2023 at 12:11:07 (UTC)
Goto Top
wie sieht denn deine MailMapping im py script aus?
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 12:16:27 (UTC)
Goto Top
Sorry für die Dummheit!


# connecting to the IMAP serer
m = imaplib.IMAP4_SSL(IMAPSERVER)
m.login(USER, PWD)
# use m.list() to get all the mailboxes
m.select("INBOX") # here you a can choose a mail box like INBOX instead  

# you could filter using the IMAP rules here (check http://www.example-code.com/csharp/imap-search-critera.asp)
searchstring = 'ALL'  
if FILTER_UNREAD_EMAILS: searchstring = 'UNSEEN'  
resp, items = m.search(None, searchstring)
items = items[0].split() # getting the mails id
for emailid in items:
	# fetching the mail, "(RFC822)" means "get the whole stuff", but you can ask for headers only, etc 
	resp, data = m.fetch(emailid, "(RFC822)")  
	# getting the mail content
	email_body = data[0][1]
	# parsing the mail content to get a mail object
	mail = email.message_from_string(email_body)
	# check if any attachments at all
	if mail.get_content_maintype() != 'multipart':  
		# marking as read and delete, if necessary
		if MARK_AS_READ_NOATTACHMENTS: m.store(emailid.replace(' ',','),'+FLAGS','\Seen')  
		if DELETE_EMAIL_NOATTACHMENTS: m.store(emailid.replace(' ',','),'+FLAGS','\\Deleted')  
		continue
	# checking sender
	sender = mail['from'].split()[-1]  
	senderaddress = re.sub(r'[<>]','', sender)  
	print "<"+str(mail['date'])+"> "+"["+str(mail['from'])+"] :"+str(mail['subject'])  
	# check if subject is allowed
	subject = mail['subject']  
	outputrule = None
	for el in MAIL_MAPPINGS:
		if el['filter_sender'] and (not (senderaddress.lower() in el['senders'])): continue  
		for sj in el['subject']:  
			if str(sj).lower() in str(subject).lower(): outputrule = el
	if outputrule == None: # no match is found
		# marking as read and delete, if necessary
		if MARK_AS_READ_NOMATCH: m.store(emailid.replace(' ',','),'+FLAGS','\Seen')  
		if DELETE_EMAIL_NOMATCH: m.store(emailid.replace(' ',','),'+FLAGS','\\Deleted')  
		continue
	outputdir = outputrule['destination']  
	# we use walk to create a generator so we can iterate on the parts and forget about the recursive headach
	for part in mail.walk():
		# multipart are just containers, so we skip them
		if part.get_content_maintype() == 'multipart':  
			# marking as read and delete, if necessary
			if MARK_AS_READ: m.store(emailid.replace(' ',','),'+FLAGS','\Seen')  
			if DELETE_EMAIL: m.store(emailid.replace(' ',','),'+FLAGS','\\Deleted')  
			continue
		# is this part an attachment?
		if part.get('Content-Disposition') is None:  
			# marking as read and delete, if necessary
			if MARK_AS_READ: m.store(emailid.replace(' ',','),'+FLAGS','\Seen')  
			if DELETE_EMAIL: m.store(emailid.replace(' ',','),'+FLAGS','\\Deleted')  
			continue
		filename = part.get_filename()
		counter = 1
		# if there is no filename, we create one with a counter to avoid duplicates
		if not filename:
			filename = 'part-%03d%s' % (counter, 'bin')  
			counter += 1
		# getting mail date
		if outputrule['add_date']:  
			d = mail['Date']  
			ss = [ ' +', ' -' ]  
			for s in ss:
				if s in d: d = d.split(s)[0]
			maildate = time.strftime('%Y%m%d', time.strptime(d, '%a, %d %b %Y %H:%M:%S'))  
			filename = maildate+'_'+filename  
		filename = decode_mime_words(u''+filename)  
		att_path = os.path.join(outputdir, filename)
		# check if output directory exists
		if not os.path.isdir(outputdir): os.makedirs(outputdir)
		# check if its already there
		if not os.path.isfile(att_path):
			try:
				print 'Saving to', str(att_path)  
				# finally write the stuff
				fp = open(att_path, 'wb')  
				fp.write(part.get_payload(decode=True))
				fp.close()
				# marking as read and delete, if necessary
				if MARK_AS_READ: m.store(emailid.replace(' ',','),'+FLAGS','\Seen')  
				if DELETE_EMAIL: m.store(emailid.replace(' ',','),'+FLAGS','\\Deleted')  
			except: pass
# Expunge the items marked as deleted... (Otherwise it will never be actually deleted)
if DELETE_EMAIL: m.expunge()
# logout
m.logout()
Mitglied: 6247018886
6247018886 Apr 26, 2023 updated at 12:26:54 (UTC)
Goto Top
Fehlen sämtliche Variablen .... 🍌 Heut schon wieder Freitag?
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 12:28:41 (UTC)
Goto Top
hi,

sorry dachte nur das binding hier der Teil bevor das Binding los geht. Leider kopiert er das ver.....te File nicht in /home/cam1/

#!/usr/bin/python

# 
# mail-attachments-archiver
# Author: Enrico Cambiaso
# Email: enrico.cambiaso[at]gmail.com
# GitHub project URL: https://github.com/auino/mail-attachments-archiver
# 

# libraries import
import email, email.header, getpass, imaplib, os, time, re

# --- --- --- --- ---
# CONFIGURATION BEGIN
# --- --- --- --- ---

# IMAP server connection configuration
USER = 'cam1@domain.de'  
PWD = '!abcd!'  
IMAPSERVER = 'localhost'  

# allowed senders list (may be configured separately for each directory)
YOUR_MAIL = 'cam1@domain.de'  
#ALICE_MAIL = 'alice@herprovider.com' 
#BOB_MAIL = 'bob@hisprovider.com' 

# storage/archive capabilities configuration
MAIL_MAPPINGS = [
	{ 'filter_sender': True, 'senders': [ YOUR_MAIL ], 'add_date': True, 'subject': [ 'TODO', 'TO-DO' ], 'destination': '/home/cam1/' },  
	#{ 'filter_sender': True, 'senders': [ ALICE_MAIL ], 'add_date': True, 'subject': [ 'BACKUP' ], 'destination': '/media/disk/backup_alice/' }, 
	#{ 'filter_sender': True, 'senders': [ BOB_MAIL ], 'add_date': True, 'subject': [ 'BACKUP' ], 'destination': '/media/disk/backup_bob/' }, 
	#{ 'filter_sender': True, 'senders': [ YOUR_MAIL, ALICE_MAIL, BOB_MAIL ], 'add_date': False, 'subject': [ 'DATA' ], 'destination': '/media/disk/data/' }, 
]

# only consider unread emails?
FILTER_UNREAD_EMAILS = True

# mark emails as read after their attachments have been archived?
MARK_AS_READ = False

# delete emails after their attachments have been archived?
DELETE_EMAIL = True

# if no attachment is found, mark email as read?
MARK_AS_READ_NOATTACHMENTS = True

# if no attachment is found, delete email?
DELETE_EMAIL_NOATTACHMENTS = True

# if no match is found (on MAIL_MAPPINGS), mark email as read?
MARK_AS_READ_NOMATCH = True

# if no match is found (on MAIL_MAPPINGS), delete email?
DELETE_EMAIL_NOMATCH = False

# --- --- --- --- ---
#  CONFIGURATION END
# --- --- --- --- ---

# source: https://stackoverflow.com/questions/12903893/python-imap-utf-8q-in-subject-string
def decode_mime_words(s): return u''.join(word.decode(encoding or 'utf8') if isinstance(word, bytes) else word for word, encoding in email.header.decode_header(s))  
Member: godlie
godlie Apr 26, 2023 updated at 12:32:49 (UTC)
Goto Top
Tja, hat deine ankommende Mail denn auch einen Betreff ala TODO oder TO-DO ?
bzw. bin ich mir grad nicht sicht mit dem YOUR_MAIL <-- ob das nicht die absender adresse sein müsste
Mitglied: 6247018886
6247018886 Apr 26, 2023 updated at 12:38:21 (UTC)
Goto Top
Zitat von @godlie:

Tja, hat deine ankommende Mail denn auch einen Betreff ala TODO oder TO-DO ?
bzw. bin ich mir grad nicht sicht mit dem YOUR_MAIL <-- ob das nicht die absender adresse sein müsste

Wollte ich gerade auch schreiben, im jetzigen Zustand muss du ja mit cam1@domain.de die Mail senden da die im Mapping als Absender hinterlegt ist zustätzlich im Betreff eines der Begriffe 'TODO', 'TO-DO' auftauchen...
Das die Mails nach jedem Durchgang gelöscht werden sollte auch klar sein weil so konfiguriert .
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 12:37:56 (UTC)
Goto Top
Hi,

ich verstehe das so das diese hier definiert ist. Das Script markiert die Mails auch als gelesen. Nur er sollte sie ja nach /home/cam1/ verschieben da tauch aber nichts auf. Laut script würde es auch den Ordner erstellen falls nicht vorhanden


# allowed senders list (may be configured separately for each directory)
YOUR_MAIL = 'cam1@domain.de'  
#ALICE_MAIL = 'alice@herprovider.com' 
#BOB_MAIL = 'bob@hisprovider.com' 
Mitglied: 6247018886
6247018886 Apr 26, 2023 at 12:39:22 (UTC)
Goto Top
Nur er sollte sie ja nach /home/cam1/ verschieben
Das Skript verschiebt nichts! Es werden Attachments extrahiert und dort gespeichert nicht die Mail selbst!
Mitglied: 6247018886
6247018886 Apr 26, 2023 at 12:41:26 (UTC)
Goto Top
Absender der Mails die eintreffen müssen hier definiert werden

{ 'filter_sender': True, 'senders': [ 'ABSENDER@domain.tld' ], 'add_date': True, 'subject': [ 'TODO', 'TO-DO' ], 'destination': '/home/cam1/' }
Member: godlie
godlie Apr 26, 2023 updated at 12:42:55 (UTC)
Goto Top
Also wenn ich das Script richtig interpretiere, dann ist dein Mapping falsch.
Deine Mails werden auf Read gesetzt da du dies ja expliziet gesetzt hast.
# if no match is found (on MAIL_MAPPINGS), mark email as read?
MARK_AS_READ_NOMATCH = True
du könntest ja mal im Mail_MAPPING einfach das YOUR_MAIL rausnehmen und ein einfaches leeres array mitgeben [], aber vorsicht, das Subject mapping ist immer noch vorhanden
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 12:44:10 (UTC)
Goto Top
Hi,
Ja genau das möchte ich. Leider genau das macht es nicht. Es scheint zu laufen (kein Fehler) und namentlich erkannte Anhänge JPG's zeigt alle nach dem Ablauf des Scrips an. Jedoch im Vermeintlichen Verzeichniss erscheint nichts. Habe eben auch mal 777 darauf gegeben um fehlende Rechte auszuschließen
Mitglied: 6247018886
6247018886 Apr 26, 2023 updated at 12:46:39 (UTC)
Goto Top
Hab's hier mal getestet, läuft einwandfrei. Ergo ist wohl dein Mapping falsch konfiguriert wenn die Zugriffsrechte stimmen. Check also die Filterung aber bitte gründlicher wie die Prüfung deines Passworts!
Member: kpunkt
Solution kpunkt Apr 26, 2023 at 12:46:36 (UTC)
Goto Top
Zitat von @JoshuaTree:

Hi,

ich verstehe das so das diese hier definiert ist.

Das schon. Aber das ist die Mailadresse, von der aus gesendet wurde. Du hast aber die Adresse angegeben, an die die Cam sendet. Zumindest stehts so in der Frage.
Und wenn es da keine Treffer gibt (der Betreff zählt da auch dazu) hat das Script nix weiter zu tun.
Und wegen MARK_AS_READ_NOMATCH = True werden auch alle Mails auf gelesen gesetzt, wenn es keine Übereinstimmung im Filter gibt.
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 12:50:12 (UTC)
Goto Top
Hi,


Zitat von @6247018886:

Hab's hier mal getestet, läuft einwandfrei. Ergo ist wohl dein Mapping falsch konfiguriert wenn die Zugriffsrechte stimmen. Check also die Filterung aber bitte gründlicher wie die Prüfung deines Passworts!

:D
Member: JoshuaTree
JoshuaTree Apr 26, 2023 updated at 12:52:47 (UTC)
Goto Top
Zitat von @6247018886:

Hab's hier mal getestet, läuft einwandfrei. Ergo ist wohl dein Mapping falsch konfiguriert wenn die Zugriffsrechte stimmen. Check also die Filterung aber bitte gründlicher wie die Prüfung deines Passworts!

Was hast du im Subject filter angegeben? TODO/TO-DO ist ja quatsch oder?
Was verstehst du unter mapping? /home/cam1/ ?
Member: kpunkt
Solution kpunkt Apr 26, 2023 at 12:55:52 (UTC)
Goto Top
Du hast das Mail-Mapping nicht verstanden?
In deinem Script werden nur die Anhänge der Mails vom Absender YOUR_MAIL in den Ordner /home/cam1 kopiert, wenn die Mails den Betreff TODO oder TO-DO haben.

Teste doch das ganze mit einer Mail samt Anhang, die du manuell an die Empfängeradresse schickst und gib der den Betreff TODO.
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 12:56:05 (UTC)
Goto Top
so schauen die rechte aus
unbenannt1
Mitglied: 6247018886
Solution 6247018886 Apr 26, 2023 updated at 12:59:21 (UTC)
Goto Top
Zitat von @JoshuaTree:

Zitat von @6247018886:

Hab's hier mal getestet, läuft einwandfrei. Ergo ist wohl dein Mapping falsch konfiguriert wenn die Zugriffsrechte stimmen. Check also die Filterung aber bitte gründlicher wie die Prüfung deines Passworts!

Was hast du im Subject filter angegeben? TODO/TO-DO ist ja quatsch oder?
Wenn das da steht natürlich! Das musst du an deine Mails anpassen! Zusätzlich zum Absender der Mails. Beides muss stimmen damit Nachrichten verarbeitet werden !
Was verstehst du unter mapping? /home/cam1/ ?
Die ganzen Properties des Tuples.
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 12:58:01 (UTC)
Goto Top
Zitat von @kpunkt:

Du hast das Mail-Mapping nicht verstanden?
In deinem Script werden nur die Anhänge der Mails vom Absender YOUR_MAIL in den Ordner /home/cam1 kopiert, wenn die Mails den Betreff TODO oder TO-DO haben.

Teste doch das ganze mit einer Mail samt Anhang, die du manuell an die Empfängeradresse schickst und gib der den Betreff TODO.

Ok, nein alles gut. Jetzt habe ich nur ein Problem die Cam benutzt den Namen des Bildes als Betreff, der ändert sich aber bei jedem Bild. Kann man da Wildcat * benutzen ?
Member: kpunkt
kpunkt Apr 26, 2023 at 13:03:23 (UTC)
Goto Top
Nicht mit dem vorgegebenen Mapping. Da wird ein String gesetzt.
Aber laut github:
Concerning subject check, if the specified subject is found inside of the entire object (not equality comparison), the attachment is store, otherwise not.

Wenn da die Extension (also ein .jpg) im Betreff mitgesendet wird, dann wird es ein '.jpg' im Mapping auch mitnehmen.
Mitglied: 6247018886
6247018886 Apr 26, 2023 updated at 13:08:48 (UTC)
Goto Top
Ist per Default wildcard nur ohne Angabe mit *. Ein leerer String matcht alle Subjects.
Member: JoshuaTree
JoshuaTree Apr 26, 2023 at 13:08:24 (UTC)
Goto Top
Hi,

dank deiner Hilfe habe ich es geschafft. Vielen herzlichen Dank für deine Geduld hatte schon etwas versucht während du vermutlich schriebst und es schein zu klappen. Jetzt habe ich es mehrfach getestet und es läuft.
{ 'filter_sender': True, 'senders': [ YOUR_MAIL ], 'add_date': True, 'subject': [ '0000000AJOM1-SYFR*.JPG', '' ], 'destination': '/home/cam1/' },  
Die Cam zählt immer 0000000AJOM1-SYFR0001.JPG hoch SYFR-Teil ändert sich nur.

Vielen vielen Dank jetzt kann ich beruhigt in Urlaub morgen fahren. Du hast was gut bei mir
Mitglied: 6247018886
Solution 6247018886 Apr 26, 2023 updated at 13:16:23 (UTC)
Goto Top
Nur ['0000000AJOM1-SYFR'] rein schreiben und den zweiten Array-Teil entfernen das Sternchen gibt's bei einem in Vergleich nicht.

https://tio.run/##K6gsycjPM/7/PzNNQd0jMUddITMPzMjJV7fiUgCCgqLMvBINJX9vBU ...
Member: kpunkt
kpunkt Apr 26, 2023 at 13:14:46 (UTC)
Goto Top
Ist ja egal, weil er dahinter einen leeren String gesetzt hat.
Mitglied: 6247018886
6247018886 Apr 26, 2023 updated at 13:16:59 (UTC)
Goto Top
Zitat von @kpunkt:

Ist ja egal, weil er dahinter einen leeren String gesetzt hat.

Jepp, dann matcht er eh alle Mails des Absenders 😉
Member: JoshuaTree
JoshuaTree Apr 27, 2023 at 05:11:23 (UTC)
Goto Top
Danke nochmals 🍻