mailbox/0040775000567100000120000000000010037345317012202 5ustar jcameronwheelmailbox/images/0040775000567100000120000000000007516703375013461 5ustar jcameronwheelmailbox/images/icon.gif0100644000567100000120000000047207431332656015072 0ustar jcameronwheelGIF89a00fff!,00I8ͻ`(dihlptmxpH,`\6(@'FL'+ąlMyN8r[{{}~ytnUf@NChiBe\Mh?AjjOzi@]Gz»DOPkPE׽ͱޑɾut^R2 H7D;mailbox/images/attach.gif0100644000567100000120000000011507060351561015372 0ustar jcameronwheelGIF89a +!, D zK4˪I1Չ '$&hg;mailbox/images/boxes.gif0100644000567100000120000000055707244671136015267 0ustar jcameronwheelGIF89a00fff!Made with GIMP!,00I8ͻ`(di@A.8][7ϭ+PĢhJ.ǏIevlz[IKV'zn't>euh^bz}8vUOKE_Cd2Yqņ^1̶վc8\:^OmCXC*.(3jܨQǏ CI ;mailbox/images/read.gif0100664000567100000120000000007707305572775015070 0ustar jcameronwheelGIF89a !,  މ7qsA;mailbox/images/special.gif0100664000567100000120000000007607307026745015565 0ustar jcameronwheelGIF89a !, NTҦ.5=,;mailbox/images/p1.gif0100644000567100000120000000006707212006465014453 0ustar jcameronwheelGIF89a !, Lf[ӵn;mailbox/images/p2.gif0100664000567100000120000000006707212006522014450 0ustar jcameronwheelGIF89a !, Lf[ӵn;mailbox/images/error.gif0100644000567100000120000000071107516703375015273 0ustar jcameronwheelGIF89a00fff!,00I8SÍIZIN,,4ho;P/UİZcr53ωtUos-/gy=EX[sT%lÓU>e}ry]Qq\k_Z@c,wqH}HZIjOklȱΝS̵χۮ޿eȯ✾k~% `"؅qB f|Ϣǁwy>FH#y#2b8U~d-e '͏er9F_H7qiCEqb=6eSU 4ٳh#> heD&n+y &̊tڝH+} /;mailbox/images/.xvpics/0040755000567100000120000000000007516703375015051 5ustar jcameronwheelmailbox/images/.xvpics/error.gif0100664000567100000120000000450507516703375016674 0ustar jcameronwheelP7 332 #IMGINFO:48x48 Indexed (457 bytes) #END_OF_COMMENTS 48 48 255 I$II۶IH%I۶%HI%۶ڶ%HIIڶ%HII۶I$II۶I$$I$I۶ڷ$IH%ڶ$IHIڶH%HI۶$I$IۀI࠻$II$۶۶$IIHڷ(EIH۶H)EH۶$I)DI$IDIֶ$IHE۶D)HI׺$I(I۶ַ(E۶`ֶ)DI)۶ֺ%HEIֺE(IE۶EH)I׺)۶D)IIֻ(E)Iڷֺ$IE)ڷֺ$IIE)D۶$I)H׺׶$Iڻr(EII׶$IE)HI۶I$ID)۶ֻ$%IHEڶD)I)DIII$II۶۶ID)IL۷(E)H۶)ֻI$II۶໶qڷ%HI)IֻI$II۶qD))ID۷I$II۶I)D)I۶ַ۶I$II۶I۶D)II۶I$IIm׶$IEI۶I$IImi۶D)EI۶qEIHI$IַI$IڷI$IڷI$Iڒ]]}]ֻ۶ے]\X\}$I۶mm۶m۶]TDI۶ڶ]\p\(I۶\\](EI$I]}I$I\}I$I\^|^|^۶I$Iڷ۶੭ͩEI۶űHI۶(I۶ڷ۶ͷڶrDII$Iѥږ۶I$II$Iɭ۶I$IѥҺ׺麷۶۶HI۶qEI۶H)۶H)I$I۶κֶַַַ͖I$ImimjmmMmjmmMmjmmMmnimMmnimmMnM۶I$I)ID۶D)IH׺(E)H۶׶(IE(۶׺໶I$I)IDI۶D)HE۶$I(I׺ַ(EH)۶ַ(໶۶`)ֶֻ$II)ڷֶ(EII׶D)EIڷDI)Eڷ)ۀ)D۶$I)H׺$II(۶׶(EIHַ$IEH۶ۀ)DI۶$I(E۶ڷ$IH)׺ַ$IHIֶH%HI۶۶)DII۶I(EI۶%H)E۶ڶ%HI)׺ֶ%HIIֶIImailbox/module.info0100664000567100000120000000057510037346346014353 0ustar jcameronwheeldesc=Read Mail desc_de=E-Mail lesen category=mail os_support=solaris *-linux freebsd hpux irix macos openserver unixware openbsd aix netbsd osf1 usermin=1 desc_nl=Lees en Verzend Mail desc_el= longdesc=Read, compose, forward and reply to email. Supports multiple folders, GnuPG encryption, attachments and an address book. desc_fr=Lecture des mails version=1.071 mailbox/lang/0040775000567100000120000000000010034125744013120 5ustar jcameronwheelmailbox/lang/de0100664000567100000120000001105610032203460013421 0ustar jcameronwheelmail_title=Benutzer-E-Mail mail_from=Von mail_date=Datum mail_subject=Betreff mail_to=An mail_cc=Cc mail_bcc=Bcc mail_pri=Priorität mail_highest=Höchste mail_high=Hoch mail_normal=Normal mail_low=Niedrig mail_lowest=Niedrigste mail_for=In $1 mail_for2=Für Benutzer $1 mail_sent=In den gesenden Mails mail_size=Grösse mail_delete=Löschen mail_compose=Neue E-Mail mail_return=Benutzer-E-Mail mail_ecannot=Sie haben keine Berechtigung, die E-Mail dieses Benutzers zu lesen mail_all=Alle auswählen mail_invert=Auswahl umkehren mail_search=Finde Nachrichten, welche in mail_body=Textkörper mail_match=übereinstimmt mit mail_ok=Suche mail_nonefrom=Kein mail_mark=Markiere als: mail_mark0=ungelesen mail_mark1=gelesen mail_mark2=Spezial mail_forward=Weiterleiten mail_move=Verschieben zu: mail_rfc=From-Zeile view_title=E-Mail lesen view_desc=Nachricht $1 in $2 view_desc2=Nachricht $1 für Benutzer $2 view_desc3=Nachricht $1 view_sent=Nachricht $1 in den gesendeten Mails view_qdesc=Nachricht $1 aus Warteschlange view_headers=Mailheader view_allheaders=Betrachte gesamten Header view_noheaders=Betrachte verkürzten Header view_attach=Anhänge view_reply=Antworten view_reply2=Allen antworten view_enew=Bearbeite als neu view_forward=Weiterleiten view_delete=Löschen view_print=Drucken view_strip=Entferne Attachments view_ecannot=Sie haben keine Berechtigung, die E-Mail dieses Benutzers zu lesen view_mark0=ungelesen view_mark1=gelesen view_mark2=Spezial view_return=Original Mail view_sub=Angefügtes Email view_egone=Diese Nachricht existiert nicht mehr. compose_title=E-Mail verfassen reply_title=E-Mail beantworten forward_title=E-Mail weiterleiten enew_title=Bearbeite Email reply_headers=Mailheader reply_attach=Weitergeleitete Anhänge reply_mailforward=Weitergeleitete Nachrichten reply_attach2=Anhänge reply_send=Senden reply_ecannot=Sie haben keine Berechtigung, als dieser Benutzer eine E-Mail zu senden send_err=Fehler beim Senden der E-Mail send_eto=Fehlende Empfängeradresse send_efrom=Vermisse From-Adresse send_title=Mail gesendet send_ok=Mail erfolgreich an $1 gesendet send_ecannot=Sie haben keine Berechtigung, als dieser Benutzer eine E-Mail zu senden send_esmtp=SMTP-Befehl $1 schlug fehl: $2 send_eattach=Attachments dürfen die grössen von $1 kB nicht überschreiten. send_eperms=Benutzer $1 kann nicht lesen $2 send_eperms2=Sie haben keine Berechtigung die Datei $1 zu senden. send_epath=Sendmail executable $1 existiert nicht. delete_title=Lösche Mail delete_rusure=Sind Sie sicher, dass Sie die $1 selektierten Nachrichten von $2 löschen möchten?
Bei grossen Dateien kann dies einen Moment dauern. delete_rusure2=Sind Sie sicher, dass Sie die Nachricht von $1 löschen möchten?
Bei grossen Dateien kann dies einen Moment dauern. delete_ok=Lösche jetzt delete_ecannot=Sie haben keine Berechtigung, Mail dieses Benutzers zu löschen delete_enone=Keine Mail zum Löschen ausgewählt delete_emnone=Keine Mails selektiert um zu markieren delete_emoveuser=Benutzer an welchen Sie das Mail verschieben möchten existiert nicht delete_emovecannot=Sie sind nicht berechtigt, Mails an diesen Benutzer zu senden delete_emovenone=Keine Mails um zu verschieben selektiert search_title=Suchergebnisse search_ecannot=Sie haben keine Berechtigung, die E-Mail dieses Benutzer zu durchsuchen search_ematch=Sie müssen Text eingeben, nach dem gesucht werden soll. search_none=Keine Nachrichten gefunden. search_results2=$1 Mail Nachrichten entsprechen $2 .. search_results3=$1 Mail Nachrichten entsprechen $2 .. acl_none=Keine acl_same=Benutzer mit dem selben Namen acl_all=Alle acl_read=Benutzer, dessen E-Mails gelesen werden dürfen acl_users=Nur Benutzer acl_userse=Alle, außer Benutzer acl_usersg=Mitglieder der Gruppe acl_from=Berechtigte From Adressen acl_any=Jede Adresse acl_fdoms=Mailbox @ domains acl_faddrs=Aufgelistete Adressen acl_fdom=Jede Adresse @ domain acl_fromname=Realer Name für from Adresse acl_apath=Beschränke Dateien und Programme auf Verzeichnis acl_attach=Total maximale Attachment grösse: acl_sent=Speichere gesendete Nachrichten in der Mailbox acl_canattach=Kann server-side files anhängen? acl_usersm=Diese Benutzer acl_asame=Identisch wie der Bentutzername acl_usersu=Mit UID aus dem Bereich log_delmail=Lösche $1 Nachrichten von $2 log_movemail=$1 Nachricht(en) von $2 nach $3 verschoben log_send=Mail gesendet an $1 mailbox/lang/en0100664000567100000120000002267610031540313013445 0ustar jcameronwheelindex_title=Read User Mail index_none=You are not allowed to read email for any users on this system. index_header=User mailboxes index_empty=No mail index_return=user list index_esystem=None of the supported mail servers (Qmail, Postfix and Sendmail) was detected on your system. You will need to adjust the module configuration to set the mail server and possibly mail paths manually. index_esystem2=The mail server set in the module configuration was not found on your system. You will need to adjust the configuration to use the correct server. index_system2=Mail server: Qmail index_system1=Mail server: Sendmail index_system0=Mail server: Postfix index_toomany=There are too many users on your system to display on one page. index_find=Find users where username index_equals=equals index_contains=contains mail_title=User Email mail_from=From mail_date=Date mail_subject=Subject mail_to=To mail_cc=Cc mail_bcc=Bcc mail_pri=Priority mail_highest=Highest mail_high=High mail_normal=Normal mail_low=Low mail_lowest=Lowest mail_for=In $1 mail_for2=For user $1 mail_sent=In sent mail list mail_size=Size mail_delete=Delete mail_compose=Compose mail_return=user mailbox mail_pos=Messages $1 to $2 of $3 in $4 mail_none=This user has no messages in $1 mail_ecannot=You are not allowed to read this user's email mail_all=Select all mail_invert=Invert selection mail_search=Find messages where mail_body=Body mail_match=matches mail_ok=Search mail_nonefrom=None mail_mark=Mark as: mail_mark0=Unread mail_mark1=Read mail_mark2=Special mail_forward=Forward mail_move=Move to: mail_copy=Copy to: mail_rfc=From line mail_eexists=Message no longer exists! mail_fchange=Change mail_sign=Sign with GnuPG key: mail_nosign=<Don't sign> mail_crypt=GnuPG encrypt for: mail_nocrypt=<Don't encrypt> mail_samecrypt=<Keys from destination addresses> mail_addresses=Manage Address Book mail_folders=Manage Folders mail_err=An error occurred listing mail in this folder : $1 mail_loginheader=POP3 server login mail_logindesc=You must enter a username and password to access mail
in your inbox on the mail server $1. mail_loginuser=Username mail_loginpass=Password mail_loginmailbox=IMAP mailbox mail_login=Login mail_reset=Clear mail_logout=Change POP3 login mail_logout2=Change IMAP login mail_sig=Edit Signature mail_jump=Jump to page : mail_of=of mail_replyto=Reply to mail_folder=Folder mail_delall=Delete All mail_deltrash=Empty Trash mail_search2=Search for: mail_advanced=Advanced Search mail_return2=User Email view_title=Read Email view_desc=Message $1 in $2 view_desc2=Message $1 for user $2 view_desc3=Message $1 view_sent=Message $1 in sent mail list view_qdesc=Queued message $1 view_headers=Mail headers view_body=Message text view_allheaders=View all headers view_noheaders=View basic headers view_attach=Attachments view_reply=Reply view_reply2=Reply to all view_enew=Edit as new view_forward=Forward view_delete=Delete view_print=Print view_strip=Remove Attachments view_ecannot=You are not allowed to read this user's email view_mark=Mark as: view_mark0=Unread view_mark1=Read view_mark2=Special view_return=original email view_sub=Attached Email view_egone=This message no longer exists view_gnupg=GnuPG signature verification view_gnupg_0=Signature by $1 is valid. view_gnupg_1=Signature by $1 is valid, but trust chain could not be established. view_gnupg_2=Signature by $1 is NOT valid. view_gnupg_3=Key ID $1 is not in your list, so signature could not be verified. view_gnupg_4=Failed to verify signature : $1 view_crypt=GnuPG mail decryption view_crypt_1=Message is encrypted, but GnuPG support is not installed. view_crypt_2=Failed to decrypt message : $1 view_crypt_3=Mail was successfully decrypted. view_recv=Fetch key ID $1 from keyserver. view_folder=Return to mailbox view_detach=Detach file: view_dall=<All files> view_dir=to server file or directory: view_black=Deny Sender view_razor=Report to Razor view_dstatus=Failed delivery status view_final-recipient=Final recipient view_diagnostic-code=Reason for failure view_remote-mta=Remote mail server view_reporting-mta=Reporting mail server view_astext=View as text view_ashtml=View as HTML view_raw=View raw message compose_title=Compose Email reply_title=Reply to Email forward_title=Forward Email enew_title=Edit Email reply_headers=Mail headers reply_attach=Forwarded attachments reply_mailforward=Forwarded messages reply_attach2=Client and server-side attachments reply_send=Send Mail reply_ecannot=You are not allowed to send mail as this user reply_body=Message text reply_spell=Check for spelling errors? reply_draft=Save as Draft send_err=Failed to send mail send_eto=Missing To address send_efrom=Missing From address send_title=Mail Sent send_ok=Mail sent successfully to $1 send_ecannot=You are not allowed to send mail as this user send_esmtp=SMTP command $1 failed : $2 send_eattach=Attachments cannot total more that $1 kB in size. send_eperms=User $1 cannot read $2 send_eperms2=You are not allowed to send file $1 send_epath=Sendmail executable $1 does not exist. send_efile=Failed to read attachment $1 : $2 send_epass=You cannot sign a message because your passphrase has not be setup yet in the GnuPG module. send_esign=Failed to sign message : $1 send_ekey=Couldn't find key for email address $1 send_ecrypt=Failed to encrypt message : $1 send_eword=Misspelt word $1 send_eword2=Misspelt word $1 - possible corrections $2 send_eline=In line $1 : send_espell=The following spelling errors were found in your message .. send_draft=Mail to $1 saved in drafts folder. send_eattachsize=The mail attachment exceeded the maximum allowed size of $1 bytes delete_title=Delete Mail delete_rusure=Are you sure you want to delete the $1 selected messages from $2? This may take some time for a large mail file. Until the deletion has finished, no other action should be performed. delete_rusure2=Are you sure you want to delete this message from $1? This may take some time for a large mail file. Until the deletion has finished, no other action should be performed. delete_ok=Delete Now delete_ecannot=You are now allowed to delete mail from this user delete_enone=No mail selected to delete delete_emnone=No mail selected to mark delete_efnone=No mail selected to forward delete_emoveuser=User to move mail to does not exist delete_ecopyuser=User to copy mail to does not exist delete_emovecannot=You are not allowed to move mail to the specified user delete_ecopycannot=You are not allowed to copy mail to the specified user delete_emovenone=No mail selected to move delete_ecopynone=No mail selected to copy delete_nobutton=No button clicked confirm_title=Confirm Delete confirm_warn=Are you sure you want to delete the $1 selected messages? confirm_warn2=Because of the size and format of your mailbox, this may take some time. Until the deletion has finished, no other action should be performed. confirm_warn3=Are you sure you want to delete this message? confirm_warn4=Until the deletion has finished, no other action should be performed. confirm_ok=Delete Now confirm_warnall=Are you sure you want to delete all of the messages in this folder? search_title=Search Results search_ecannot=You are not allowed to search this user's email search_ematch=You must enter text to match against. search_efield=You must select a search type. search_ewhat=No text to match against entered for row $1 search_enone=No search criteria entered search_none=No messages found. search_results2=$1 mail messages matching $2 .. search_results3=$1 mail messages not matching $2 .. search_results4=$1 mail messages matching your search .. search_local=In local folders search_all=In all folders folder_inbox=Inbox folder_sent=Sent mail folder_drafts=Drafts folder_trash=Trash detach_err=Failed to detach file detach_edir=No file or directory to save to entered detach_eopen=Failed to open $1 : $2 detach_ewrite=Failed to write to $1 : $2 detach_title=Detach File detach_ok=Wrote attachment to server-side file $1 ($2). sform_title=Advanced Search sform_and=Find messages matching all criteria below .. sform_or=Find messages matches any criteria below .. sform_neg0=contains sform_neg1=doesn't contain sform_ok=Search Now sform_folder=in folder(s) sform_all=<All folders> sform_local=<Local folders> sform_where=Where sform_text=the text sform_from=From: header sform_subject=Subject: header sform_to=To: header sform_cc=Cc: header sform_date=Date: header sform_body=message body sform_headers=any header sform_size=message size sform_return=advanced search form find_enone=No users matching your search were found find_title=Search Results find_results=Users matching search for $1 .. find_user=Username find_real=Real name find_group=Group find_home=Home directory find_size=Mail size acl_none=None acl_same=User with same name acl_all=All acl_read=Users whose mail can be read acl_users=Only users acl_userse=All except users acl_usersg=Members of group acl_from=Allowable From addresses acl_any=Any address acl_fdoms=Mailbox @ domains acl_faddrs=Listed addresses acl_fdom=Any address @ domain acl_fromname=Real name for From address acl_apath=Limit files and program to directory acl_attach=Maximum total attachments size acl_sent=Store sent mail in mailbox acl_canattach=Can attach server-side files? acl_candetach=Can detach files to server? acl_usersm=Users matching acl_asame=Same as username acl_usersu=With UID in range log_delmail=Deleted $1 messages from $2 log_movemail=Moved $1 messages from $2 to $3 log_copymail=Copied $1 messages from $2 to $3 log_send=Sent mail to $1 mailbox/lang/ca0100664000567100000120000001044110032203465013416 0ustar jcameronwheelmail_title=Correu d'Usuari mail_from=De mail_date=Data mail_subject=Ttol mail_to=Per a mail_pri=Prioritat mail_highest=Mxima mail_high=Alta mail_low=Baixa mail_lowest=Mnima mail_for=A $1 mail_for2=Per l'usuari $1 mail_sent=A la llista de correu enviat mail_size=Mida mail_delete=Suprimeix mail_compose=Redacta mail_return=a la bstia de l'usuari mail_ecannot=No tens perms per llegir el correu d'aquest usuari mail_all=Selecciona'ls tots mail_invert=Inverteix la selecci mail_search=Busca missatges tals que mail_body=el cos mail_match=coincideixi amb mail_ok=Busca mail_nonefrom=Cap mail_mark=Marca com: mail_mark0=No llegits mail_mark1=Llegits mail_mark2=Especials mail_forward=Reenvia mail_move=Desplaa a: mail_rfc=De la lnia view_title=Lectura de Correu view_desc=Missatge $1 de $2 view_desc2=Missatge $1 de l'usuari $2 view_desc3=Missatge $1 view_sent=Missatge $1 de la llista de correu enviat view_qdesc=He posat en cua el missatge $1 view_headers=Capaleres de correu view_allheaders=Mostra totes les capaleres view_noheaders=Mostra les capaleres bsiques view_attach=Adjuncions view_reply=Respon view_reply2=Respon a tothom view_enew=Edita com a nou view_forward=Reenvia view_delete=Suprimeix view_print=Imprimeix view_strip=Treu les Adjuncions view_ecannot=No tens perms per llegir el correu d'aquest usuari view_mark0=No llegit view_mark1=Llegit view_mark2=Especial view_return=al correu original view_sub=Correu Adjunt view_egone=Aquest missatge ja no existeix compose_title=Redacci de Correu reply_title=Respon al Correu forward_title=Reenvia al Correu enew_title=Edici de Correu reply_headers=Capaleres de correu reply_attach=Reenvia les adjuncions reply_mailforward=Missatges reenviats reply_attach2=Adjuncions de client i de la part del servidor reply_send=Envia Correu reply_ecannot=No tens perms per enviar correu amb aquest usuari send_err=No he pogut enviar el correu send_eto=Hi falta l'adrea de destinaci send_efrom=Hi falta l'adrea del remitent send_title=Correu Enviat send_ok=Correu enviat a $1 amb xit send_ecannot=No tens perms per enviar correu amb aquest usuari send_esmtp=L'ordre SMTP $1 ha fallat: $2 send_eattach=Les adjuncions no poden fer ms de $1 Kb en total. send_eperms=L'usuari $1 no pot llegir $2 send_eperms2=No tens perms per enviar el fitxer $1 send_epath=L'executable $1 de sendmail no existeix. delete_title=Supressi de Correu delete_rusure=Segur que vols suprimir els $1 missatges seleccionats de $2? Aix pot trigar una mica si el fitxer de correu s gran. Fins que no s'hai acabat d'esborrar, conv no executar cap altra acci. delete_rusure2=Segur que vols esborrar el missatge de $1? Aix pot trigar una mica si el fitxer de correu s gran. Fins que no s'hai acabat d'esborrar, conv no executar cap altra acci. delete_ok=Suprimeix-ho Ara delete_ecannot=No tens perms per suprimir correus d'aquest usuari delete_enone=No has seleccionat cap correu per suprimir delete_emnone=No has seleccionat cap correu per marcar delete_emoveuser=L'usuari no existeix delete_emovecannot=No tens perms per desplaar el correu a l'usuari especificat delete_emovenone=No has seleccionat el correu a desplaar delete_nobutton=No has fet clic a cap bot search_title=Resultats de la Recerca search_ecannot=No tens perms per buscar dins del correu d'aquest usuari search_ematch=Has d'introduir el text de la recerca search_efield=Has de seleccionar un tipus de recerca. search_none=No s'ha trobat cap missatge. search_results3=$1 missatges de correu que no coincideixen amb $2... acl_none=Cap acl_same=Usuari amb el mateix nom acl_all=Tots acl_read=Usuaris el correu dels quals pot ser llegit acl_users=Noms els usuaris acl_userse=Tots excepte els usuaris acl_usersg=Membres del grup acl_from=Adreces From permissibles acl_any=Qualsevol adrea acl_fdoms=Dominis @ de bstia acl_faddrs=Adreces llistades acl_fdom=Qualsevol domini @ d'adrea acl_fromname=Nom real per a l'adrea From acl_apath=Limita els fitxers i el programa al directori acl_attach=Mida mxima total de les adjuncions acl_sent=Emmagatzema el correu enviat a la bstia acl_canattach=Pot adjuntar fitxers de la part del servidor acl_usersm=Usuaris que coincideixen amb acl_asame=Igual que el nom de l'usuari acl_usersu=Amb UID en el rang log_delmail=He suprimit $1 missatges de $2 log_movemail=He desplaat $1 missatges de $2 a $3 log_send=He enviat el correu a $1 mailbox/lang/es0100664000567100000120000000664010032203472013446 0ustar jcameronwheelmail_title=Correo de Usuario mail_from=Desde mail_date=Fecha mail_subject=Asunto mail_to=Para mail_pri=Prioridad mail_highest=La mayor mail_high=Alta mail_low=Baja mail_lowest=La ms baja mail_for=En $1 mail_for2=Para usuario $1 mail_sent=En lista de correo enviado mail_size=Medida mail_delete=Borrar mensajes seleccionados mail_compose=Componer nuevo correo mail_return=correo de usuario mail_ecannot=No ests autorizado a leer el correo de este usuario mail_all=Seleccionar todos mail_invert=Invertir seleccin mail_search=Hallar mensajes donde mail_body=Cuerpo mail_match=que coincida con mail_ok=Buscar mail_nonefrom=Ninguno mail_mark=Marcar los seleccionados como: mail_mark0=No ledos mail_mark1=Ledos mail_mark2=Especiales mail_forward=Remitir seleccionado mail_rfc=Desde lnea view_title=Leer Correo view_desc=Mensaje $1 en $2 view_desc2=Mensaje $1 para usuario $2 view_desc3=Mensaje $1 view_sent=Mensaje $1 en lista de corre enviado view_qdesc=Mensaje en cola $1 view_headers=Cabeceras de Correo view_allheaders=Ver todas las cabeceras view_noheaders=Ver cabeceras bsicas view_attach=Adjuntados view_reply=Responder view_reply2=Reponder a todos view_enew=Editar como nuevo view_forward=Remitir a view_delete=Borrar view_strip=Quitar Adjuntados view_ecannot=No ests autorizado a leer el correo de este usuario view_mark0=No ledo view_mark1=Ledo view_mark2=Especial view_return=correo original view_sub=Correo Adjunto compose_title=Componer Correo reply_title=Responder a Correo forward_title=Remitir Correo reply_headers=Cabeceras de Correo reply_attach=Adjuntados remitidos reply_mailforward=Mensajes remitidos reply_attach2=Adjuntados desde cliente y servidor reply_send=Enviar Correo reply_ecannot=No ests autorizado a enviar correo a este usuario send_err=Error al enviar correo send_eto=Direccin 'A' sin poner send_efrom=Direccin 'De' sin poner send_title=Correo enviado send_ok=Correo enviado correctamente a $1 send_ecannot=No ests autorizado a enviar correo como este usuario send_esmtp=Ha fallado el comando SMTP $1 : $2 send_eattach=Los archivos includos no pueden exceder ms de 1kB de medida send_eperms=El usuario $1 no puede leer $2 send_eperms2=No ests autorizado a enviar archivo $1 send_epath=El ejecutable de Sendmail $1 no existe. delete_ecannot=No ests autorizado a borrar correo de este usuario delete_enone=No se ha seleccionado correo para ser borrado delete_emnone=No hay correo seleccionado para marcar search_title=Resultados de la bsqueda search_ecannot=No ests autorizado a buscar en este correo de usuario search_ematch=Debes de digitar un texto que coincida con algo. search_none=No se han encontrado mensajes. search_results3=$1 mensajes de correo no coinciden con $2... acl_none=Ninguno acl_same=Usuario con mismo nombre acl_all=Todos acl_read=Usuarios cuyo correo puede ser ledo acl_users=Usuarios acl_userse=Todos excepto los usuarios acl_usersg=Miembros de grupo acl_from=Direcciones 'desde' autorizadas acl_any=Cualquier direccin acl_fdoms=Buzones en dominios acl_faddrs=Direcciones listadas acl_fdom=Cualquier direccin en dominio acl_fromname=Nombre real para direccin remitente acl_apath=Limitar archivos y programa a directorio acl_attach=Medida mxima total de archivos a incluir acl_sent=Almacenar correo enviado en buzn acl_canattach=Puede adjuntar archivos del lado servidor? acl_usersm=Usuarios que coincidan acl_asame=Igual que nombre de usuario log_delmail=Borrados $1 mensajes de $2 log_send=Enviado correo a $1 mailbox/lang/fr0100664000567100000120000000323710032203476013451 0ustar jcameronwheelmail_title=Courrier de l'Usager mail_from=De mail_subject=Sujet mail_to= mail_cc=Copie carbone mail_for=Dans $1 mail_size=Taille mail_delete=Supprimer les messages slectionns mail_compose=crire un nouveau courrier mail_return=courrier de l'usager mail_ecannot=Vous n'tes pas autoris lire les courriers des usagers mail_all=Selectionner tout mail_invert=Selectioner l'inverse view_title=Lire un Courrier view_desc=Courrier $1 dans $2 view_qdesc=Courrier $1 de la file d'attente view_headers=Enttes du courrier view_attach=Attachements view_reply=Rpondre view_reply2=Rpondre tous view_forward=Renvoyer view_delete=Supprimer view_ecannot=Vous n'tes pas autoris lire les courriers des usagers compose_title=crire un Courrier reply_title=Rpondre au Courrier forward_title=Rediriger un Courrier reply_headers=Enttes du courrier reply_attach=Attachement envoy reply_attach2=Attachements reply_send=Envoyer reply_ecannot=Vous n'tes pas autoris envoyer un courrier de cet usager send_err=Impossible d'envoyer le courrier send_eto=Adresse du destinataire manquante send_efrom=Adresse de l'metteur manquant send_title=Courrier Envoy send_ok=Courrier envoy avec succs $1 send_ecannot=Vous n'tes pas autoris envoyer un courrier de cet usager send_esmtp=Impossible d'excuter la commande SMTP $1 : $2 delete_ecannot=Vous n'tes pas autoris supprimer les courriers de cet usager acl_none=Aucun acl_all=Tous acl_read=Usagers dont les courriers peuvent tre lu acl_users=Seulement les usagers acl_userse=Tous acl_from=Des adresses acl_any=De toutes les adresses acl_fdoms=Bote aux lettres des domaines acl_faddrs=Adresses listes acl_fdom=Toutes les adresses d'un domaines mailbox/lang/ja_JP.euc0100664000567100000120000000452710032203504014573 0ustar jcameronwheelmail_title=桼 E ᡼ mail_from= mail_date= mail_subject=̾ mail_to= mail_pri=ͥ mail_highest=ͥ mail_high= mail_normal=ɸ mail_low= mail_lowest=Ǹ mail_for=$1 mail_sent=Ѥߥ᡼ ꥹ mail_size= mail_delete=򤵤줿å mail_compose=᡼ mail_return=桼 E ᡼ mail_ecannot=Υ桼Υ᡼ɤޤ mail_all=٤ mail_invert=ȿž mail_search=åθ mail_body=ʸ mail_match= mail_ok= mail_nonefrom=ʤ view_title=E ᡼ɤ view_desc=$2Υå $1 view_sent=Ѥߥ᡼ ꥹȤΥå $1 view_qdesc=塼줿å $1 view_headers=᡼ إå view_attach=źեե view_reply=ֿ view_reply2=ֿ view_enew=ȤԽ view_forward=ž view_delete= view_ecannot=Υ桼Υ᡼ɤޤ compose_title=E ᡼κ reply_title=E ᡼ؤֿ forward_title=E ᡼ž reply_headers=᡼ إå reply_attach=ž줿źեե reply_attach2=źեե reply_send= reply_ecannot=Υ桼ȤƤϥ᡼Ǥޤ send_err=᡼ǤޤǤ send_eto=To ʰ˥ɥ쥹ޤ send_efrom=From () ɥ쥹ޤ send_title=줿᡼ send_ok=$1 ؤΥ᡼λޤ send_ecannot=Υ桼ȤƤϥ᡼Ǥޤ send_esmtp=SMTP ޥ $1 Ԥޤ: $2 send_eattach=źեեΥ $1 KB ۤޤ send_eperms=桼 $1 $2 ɤ߼ޤ send_eperms2=ե $1 Ǥޤ delete_ecannot=Υ桼Υ᡼Ǥޤ delete_enone=å򤵤Ƥޤ search_title= search_ecannot=Υ桼Υ᡼ϸǤޤ search_ematch=ˤϥƥȤϤɬפޤ search_none=åĤޤǤ acl_none=ʤ acl_same=Ʊ̾Υ桼 acl_all=٤ acl_read=᡼ɤ߼桼 acl_users=Υ桼Τ acl_userse=Υ桼ʳ٤ acl_usersg=롼פΥС acl_from=ɥ쥹 acl_any=ǤդΥɥ쥹 acl_fdoms=᡼ܥå @ ɥᥤ acl_faddrs=ꥹȤ줿ɥ쥹 acl_fdom=ǤդΥɥ쥹 @ ɥᥤ acl_apath=ǥ쥯ȥؤΥեȥץ acl_attach=źեեιץκ acl_sent=Ѥߥ᡼᡼ܥå¸ log_delmail=$1 å $2 ޤ log_send=$1 ˥᡼ޤ mailbox/lang/ja_JP.jis0100664000567100000120000000452710032203513014604 0ustar jcameronwheelmail_title=[U E [ mail_from=M mail_date=t mail_subject= mail_to= mail_pri=Dx mail_highest=ŗD mail_high= mail_normal=W mail_low= mail_lowest=Ō mail_for=$1 mail_sent=Mς݃[ Xg mail_size=TCY mail_delete=IꂽbZ[W폜 mail_compose=VK[쐬 mail_return=[U E [ mail_ecannot=̃[U[̃[͓ǂ߂܂ mail_all=ׂđI mail_invert=I̔] mail_search=bZ[W̌ mail_body={ mail_match=v mail_ok= mail_nonefrom=Ȃ view_title=E [ǂ view_desc=$2̃bZ[W $1 view_sent=Mς݃[ Xg̃bZ[W $1 view_qdesc=L[ꂽbZ[W $1 view_headers=[ wb_ view_attach=Ytt@C view_reply=ԐM view_reply2=SɕԐM view_enew=VKƂĕҏW view_forward=] view_delete=폜 view_ecannot=̃[U[̃[͓ǂ߂܂ compose_title=E [̍쐬 reply_title=E [ւ̕ԐM forward_title=E [̓] reply_headers=[ wb_ reply_attach=]ꂽYtt@C reply_attach2=Ytt@C reply_send=M reply_ecannot=̃[UƂĂ̓[𑗐Mł܂ send_err=[𑗐Mł܂ł send_eto=To ijAhX܂ send_efrom=From (M) AhX܂ send_title=Mꂽ[ send_ok=$1 ւ̃[̑M܂ send_ecannot=̃[UƂĂ̓[𑗐Mł܂ send_esmtp=SMTP R}h $1 s܂: $2 send_eattach=Ytt@C̃TCY $1 KB z܂B send_eperms=[U $1 $2 ǂݎ܂ send_eperms2=t@C $1 ͑Mł܂ delete_ecannot=̃[Ũ[폜ł܂ delete_enone=폜郁bZ[WIĂ܂ search_title= search_ecannot=̃[Ũ[͌ł܂ search_ematch=ɂ̓eLXg͂Kv܂B search_none=bZ[W‚܂łB acl_none=Ȃ acl_same=̃[U acl_all=ׂ acl_read=[ǂݎ郆[U acl_users=̃[Û acl_userse=̃[UȊOׂ acl_usersg=O[ṽo[ acl_from=AhX狖 acl_any=Cӂ̃AhX acl_fdoms=[{bNX @ hC acl_faddrs=XgꂽAhX acl_fdom=Cӂ̃AhX @ hC acl_apath=fBNgւ̃t@CƃvO𐧌 acl_attach=Ytt@C̍vTCY̍ől acl_sent=Mς݃[[{bNXɕۑ log_delmail=$1 bZ[W $2 폜܂ log_send=$1 Ƀ[𑗐M܂ mailbox/lang/ko_KR.euc0100664000567100000120000000434610032203523014615 0ustar jcameronwheelmail_title= mail_from=߽ mail_date=¥ mail_subject= mail_to= mail_cc= mail_bcc= mail_pri=켱 mail_highest= mail_high= mail_normal= mail_low= mail_lowest= mail_for=$1 mail_sent=߽ mail_size=ũ mail_delete= ޽ mail_compose= ۼ mail_return= mail_ecannot= ϴ mail_all= mail_invert=ݴ mail_search=޽ ˻ ġ mail_body= mail_match=ġ mail_ok=˻ mail_nonefrom= view_title= б view_desc=$2 ִ ޽ $1 view_sent=߽ Ͽ ִ ޽ $1 view_qdesc=⿭ ִ ޽ $1 view_headers= view_attach=÷ view_reply=ȸ view_reply2=ü ȸ view_enew= Ϸ view_forward= view_delete= view_ecannot= ϴ compose_title= ۼ reply_title= Ͽ ȸ forward_title= reply_headers= reply_attach=޵ ÷ reply_attach2=÷ reply_send= reply_ecannot= ڷ ϴ send_err= ߽ϴ send_eto= ּ send_efrom= ߽ ּ send_title= Ϸ send_ok=$1 ߽ϴ. send_ecannot= ڷ ϴ send_esmtp=SMTP $1 : $2 send_eattach=÷ ũ $1KB ʰ ϴ. send_eperms= $1() $2() ϴ send_eperms2= $1() ϴ delete_ecannot= ڷκ ϴ delete_enone= ʾҽϴ search_title=˻ search_ecannot= ˻ ϴ search_ematch=˻ ؽƮ Էؾ մϴ. search_none=޽ ϴ. acl_none= acl_same≠ acl_all= acl_read= ִ acl_users=ڸ acl_userse=ڸ acl_usersg=׷ acl_from= ߽ ּ acl_any= ּ acl_fdoms=缭@ acl_faddrs= ּ acl_fdom= ּ@ acl_apath=丮 α׷ acl_attach=ü ÷ ִ ũ acl_sent=缭Կ ߽ log_delmail=$2 $1 ޽ log_send=$1 Ϸ mailbox/lang/pl0100664000567100000120000000625210032203535013451 0ustar jcameronwheelmail_title=Poczta uytkownika mail_from=Od mail_date=Wysano mail_subject=Temat mail_to=Do mail_cc=DW mail_bcc=UDW mail_pri=Priorytet mail_highest=Najwyszy mail_high=Wysoki mail_normal=Zwyky mail_low=Niski mail_lowest=Najniszy mail_for=W $1 mail_for2=Dla uytkownika $1 mail_sent=Na licie poczty wysanej mail_size=Rozmiar mail_delete=Skasuj wybrane wiadomoci mail_compose=Utwrz now wiadomo mail_return=skrzynki uytkownika mail_ecannot=Nie masz uprawnie do czytania poczty tego uytkownika mail_all=Wybierz wszystko mail_invert=Odwr zaznaczenia mail_search=Znajd wiadomoci, w ktrych mail_body=Tre mail_match=zawiera mail_ok=Szukaj mail_nonefrom=Brak mail_mark=Zaznacz wybrane jako: mail_mark0=Nie przeczytane mail_mark1=Przeczytane mail_mark2=Specjalne view_title=Czytaj poczt view_desc=Wiadomo $1 w $2 view_desc2=Wiadomo $1 dla uytkownika $2 view_desc3=Wiadomo $1 view_sent=Wiadomo $1 na licie poczty wysanej view_qdesc=Wiadomo w kolejce $1 view_headers=Nagwki wiadomoci view_attach=Zaczniki view_reply=Odpowiedz view_reply2=Odpowiedz wszystkim view_enew=Edytuj jako now view_forward=Przeka dalej view_delete=Skasuj view_strip=Usu zaczniki view_ecannot=Nie masz uprawnie do czytania poczty tego uytkownika view_mark0=Nie przeczytan view_mark1=Przeczytan view_mark2=Specjaln view_return=pierwotnego adresu e-mail compose_title=Utwrz wiadomo reply_title=Odpowiedz na wiadomo forward_title=Przeka dalej reply_headers=Nagwki wiadomoci reply_attach=Przekazywane zaczniki reply_attach2=Zaczniki reply_send=Wylij reply_ecannot=Nie masz uprawnie do czytania poczty jako ten uytkownik send_err=Nie udao si wysa wiadomoci send_eto=Brak adresu docelowego send_efrom=Brak adresu rdowego send_title=Wiadomo wysana send_ok=Wiadomo pomylnie wysana do $1 send_ecannot=Nie masz uprawnie do wysyania poczty jako ten uytkownik send_esmtp=Polecenie SMTP $1 zakoczyo sie bdem : $2 send_eattach=czny rozmiar zacznikw nie moe przekracza $1 kB. send_eperms=Uytkownik $1 nie ma uprawnie do czytania $2 send_eperms2=Nie masz uprawnie do wysania pliku $1 delete_ecannot=Nie masz uprawnie do kasowania poczty tego uytkownika delete_enone=Nie wybrano wiadomoci do skasowania delete_emnone=Nie wybrano wiadomoci do zaznaczenia search_title=Wyniki poszukiwania search_ecannot=Nie masz uprawnie do przeszukiwania poczty tego uytkownika search_ematch=Musisz wprowadzi poszukiwany tekst search_none=Nie znaleziono adnej wiadomoci acl_none=adne acl_same=Uytkownika o tej samej nazwie acl_all=Wszystkie acl_read=Uytkownicy, ktrych poczta moe by czytana acl_users=Tylko uytkownicy acl_userse=Oprcz uytkownikw acl_usersg=Czonkowie grupy acl_from=Dozwolone adresy rdowe acl_any=Dowolny adres acl_fdoms=Skrzynka @ domeny acl_faddrs=Wymienione adresy acl_fdom=Dowolny adres @ domena acl_fromname=Rzeczywista nazwa dla adresu rdowego acl_apath=Ograniczy pliki i&npsp;programy do umieszczonych w&npsp;katalogu acl_attach=Maksymalny czny rozmiar zacznikw acl_sent=Przechowywa wysan poczt w skrzynce acl_canattach=Moe docza pliki z serwera? log_delmail=Usunito $1 wiadomoci z $2 log_send=Wysano wiadomo do $1 mailbox/lang/pt0100664000567100000120000000224210032203541013451 0ustar jcameronwheelmail_title=Email do Utilizador mail_from=De mail_date=Data mail_subject=Assunto mail_to=Para mail_for=Em $1 mail_compose=Compor novo correio mail_return=email do utilizador mail_ecannot=Voc no est autorizado para ler o correio deste utilizador view_title=Ler Correio view_desc=Mensagem $1 em $2 view_qdesc=Mensagem em lista de espera $1 view_headers=Cabaalhos de correio view_attach=Anexos view_reply=Responder ao autor view_reply2=Responder a todos view_forward=Reenviar view_delete=Apagar view_ecannot=Voc no est autorizado para ler o correio deste utilizador compose_title=Compor Email reply_title=Responder ao Email forward_title=Reenviar Email reply_headers=Cabealhos de Correio reply_attach=Anexos Reenviados reply_attach2=Anexos reply_send=Enviar reply_ecannot=Voc no est autorizado para enviar correio como sendo este utilizador send_err=Erro ao enviar correio send_eto=Falta o endereo do destinatrio send_title=Correio enviado send_ok=O correio foi enviado com sucesso para $1 send_ecannot=Voc no est autorizado para enviar correio como sendo este utilizador acl_none=Nenhum acl_all=Todos acl_read=Utilizadores cujo correio pode ser lido acl_users=Utilizadores mailbox/lang/sv0100664000567100000120000000441110032203565013464 0ustar jcameronwheelmail_title=Anvndar-e-post mail_from=Frn mail_date=Datum mail_subject=rende mail_to=Till mail_cc=Kopia till mail_bcc=Osynlig kopia till mail_pri=Prioritet mail_highest=Hgsta mail_high=Hg mail_low=Lg mail_lowest=Lgsta mail_for=I $1 mail_size=Storlek mail_delete=Radera angivna brev mail_compose=Skriv nytt brev mail_return=anvndarpost mail_ecannot=Du fr inte lsa e-post till denna anvndare mail_all=Vlj allt mail_invert=Vlj allt utom redan valt mail_search=Sk meddelanden dr mail_body=Brevkroppen mail_match=innehller mail_ok=Sk mail_nonefrom=Ingen view_title=Ls e-post view_desc=Brev $1 i $2 view_qdesc=Kad e-post $1 view_headers=Rubriker view_attach=Bilagor view_reply=Svara view_reply2=Svara till alla view_forward=Skicka vidare view_delete=Radera view_ecannot=Du fr inte lsa e-post till denna anvndare compose_title=Skriv brev reply_title=Svara p brev forward_title=Skicka vidare brev reply_headers=Rubriker reply_attach=Vidaresnda bilagor reply_attach2=Bilagor reply_send=Skicka reply_ecannot=Du fr inte skicka e-post som denna anvndare send_err=Det gick inte att skicka brevet send_eto=Mottagaradress saknas send_efrom=Avsndaradress saknas send_title=Skickat brev send_ok=Brevet skickat till $1 send_ecannot=Du fr inte skicka e-post som denna anvndare send_esmtp=SMTP-kommando $1 misslyckades: $2 send_eattach=Den sammanlagda storleken p bilagorna fr inte vara strre n $1 kB send_eperms=Anvndare $1 kan inte lsa $2 send_eperms2=Du fr inte skicka filen $1 delete_ecannot=Du fr inte radera e-post frn denna anvndare delete_enone=Du har inte angivit vilket meddelande som ska tas bort search_title=Skresultat search_ecannot=Du fr inte ska i denna anvndares e-post search_ematch=Du mste ange en text som brevet ska innehlla search_none=Inget brev passade in p angivna villkor acl_none=Inga acl_same=Anvndare med samma namn acl_all=Alla acl_read=Anvndare vars e-post fr lsas acl_users=Endast anvndare acl_userse=Alla utom anvndare acl_usersg=Medlemmar i grupp acl_from=Tilltna avsndaradresser acl_any=Alla acl_fdoms=brevlda@domner acl_faddrs=Angivna adresser acl_fdom=valfri adress@domn acl_apath=Begrnsa filer och program till katalog acl_attach=Maximal sammanlagd storlek p bilagor log_delmail=Tog bort $1 brev frn $2 log_send=Skickade e-post till $1 mailbox/lang/tr0100664000567100000120000000433510032203570013462 0ustar jcameronwheelmail_title=Kullanc E-Posta mail_from=Nereden mail_date=Tarih mail_subject=Konu mail_to=Nereye mail_pri=ncelik mail_highest=En yksek mail_high=Yksek mail_low=Dk mail_lowest=en dk mail_for=$1'de mail_size=Boyut mail_delete=Seilen mesajlar sil mail_compose=Yeni posta olutur mail_return=Kullanc e-posta mail_ecannot=Bu kullancnn e-postasn okumak iin izininiz yoktur mail_all=Hepsini se mail_invert=Seimi ters evir mail_search=Mesajlarn aranlaca yer mail_body=Mesaj ierii mail_ok=Ara view_title=E-posta oku view_desc=Mesaj $1, $2'de view_qdesc=Kuyrua konulmu mesaj $1 view_headers=Posta balklar view_attach=Ekler view_reply=Geri gnder view_reply2=Hepsine geri gnder view_forward=Dndr view_delete=Sil view_ecannot=Bu kullancnn e-postasn okumak iin izininiz yoktur compose_title=E-posta Gnder reply_title=E-postay Geri Gnder forward_title=E-postay Dndr reply_headers=Posta balklar reply_attach=Dndrlm ekler reply_attach2=Ekler reply_send=Gnder reply_ecannot=Bu kullanc olarak e-posta gndermek iin izininiz yoktur send_err=Postann gnderilmesinde hata olutu send_eto=Nereye adresini girmelisiniz send_efrom=Nereden adresini girmelisiniz send_title=Posta Gnder send_ok=Posta $1'e baaryla gnderildi send_ecannot=Bu kullanc olarak e-posta gndermek iin izininiz yoktur send_esmtp=SMTP komutu $1'de hata olutu : $2 send_eattach=Ek dosyalarn boyutu $1 KB'den daha byk olmamaldrlar. send_eperms=$1 kullancs $2'yi okuyamaz delete_ecannot=Bu kullanc olarak e-posta silmek iin izininiz yoktur delete_enone=Silmek iin posta silinmedi search_title=Arama sonular search_ecannot=Bu kullanc e-postalarn aramak iin izininiz yoktur search_ematch=Takip eden kutuya bir yaz girmelisiniz search_none=Mesaj bulunamad. acl_none=Hibiri acl_all=Hepsi acl_read=Kullanclarn okuyabilecekleri postalar acl_users=Sadece kullanclar acl_userse=Kullanclardan baka herkes acl_from=zin verilebilir From: adresleri acl_any=Herhangi bir adres acl_fdoms=Posta kutusu @ alanlar acl_faddrs=Listelenmi alanlar acl_fdom=Herhangi adres @ alan acl_apath=Dizin iin program ve dosya limitleri acl_attach=En ok toplam posta ek dosyalar boyutu log_delmail=$2'den $1 mesaj silindi log_send=$1'e posta gnderildi mailbox/lang/zh_CN0100664000567100000120000000477310032203577014053 0ustar jcameronwheelmail_title=ûʼ mail_from= mail_date= mail_subject= mail_to= mail_cc=ת mail_bcc= mail_pri=ȼ mail_highest= mail_high= mail_normal=һ mail_low= mail_lowest= mail_for= $1 mail_for2=û$1 mail_sent=ڷʼб mail_size=С mail_delete=ɾѡʼ mail_compose=дʼ mail_return=û mail_ecannot=ûĶûʼȨ mail_all=ȫѡ mail_invert=ѡȡ mail_search=Ѱʼ mail_body= mail_match=ƥ mail_ok= mail_nonefrom= mail_mark=ѡеʼΪ mail_mark0=δĶ mail_mark1=Ķ mail_mark2=ر mail_forward=תѡ mail_rfc=ļ view_title=Ķʼ view_desc=$2еʼ$1 view_desc2=û$2ʼ$1 view_desc3=ʼ$1 view_sent=ѷʼбеʼ$1 view_qdesc=ʼ $1 view_headers=ʼͷ view_allheaders=鿴ʼͷ view_noheaders=쿴ʼͷ view_attach= view_reply=ظ view_reply2=ظ view_enew=༭ʼ view_forward=ת view_delete=ɾ view_strip=Ƴ view_ecannot=ûĶûʼȨ view_mark0=δĶ view_mark1=Ķ view_mark2=ر view_return=ԭ view_sub=иʼ compose_title=дʼ reply_title=ظʼ forward_title=תʼ reply_headers=ʼͷ reply_attach=תĸ reply_mailforward=תʼ reply_attach2=ͻ˺ͷĸ reply_send= reply_ecannot=ûûݷʼȨ send_err=޷ʼ send_eto=δ롰ַ send_efrom=ʧԡַ send_title=ѷ͵ʼ send_ok=ʼѳɹ͵ $1 send_ecannot=ûûݷʼȨ send_esmtp=SMTP $1 ʧܣ$2 send_eattach=Сܳ $1 kB send_eperms=û $1 Ķ $2 send_eperms2=ûзļ$1Ȩ send_epath=Sendmail $1ڡ delete_ecannot=ûɾûʼȨ delete_enone=ûѡҪɾʼ delete_emnone=ûѡҪǵʼ search_title= search_ecannot=ûûʼȨ search_ematch=ٴƥı search_none=Ҳʼ search_results2=$1ʼƥ$2 .. search_results3=$1ʼƥ$2 .. acl_none= acl_same=ͬû acl_all= acl_read=Ķʼû acl_users=û acl_userse=û acl_usersg=ijԱ acl_from=ԡַ acl_any=κεַ acl_fdoms= @ acl_faddrs=гĵַ acl_fdom=κεַ @ acl_fromname=Դַ acl_apath=ļͳĿ¼ acl_attach=󸽼ܴС acl_sent=дѷ͵ʼ acl_canattach=ճļ acl_usersm=ƥû acl_asame=ûͬ log_delmail=Ѵ $2 ɾ $1ʼ log_send=ѷʼ $1 mailbox/lang/zh_TW.Big50100664000567100000120000000306310032203606014652 0ustar jcameronwheelmail_title=ϥΪ̹qll mail_from=HH mail_date= mail_subject=DD mail_to=H mail_cc=ƥ۰e mail_bcc=ðƥ mail_pri=u mail_highest=̰ mail_high= mail_normal=@ mail_low=C mail_lowest=̧C mail_for=b $1 mail_size=jp mail_delete=Rܪl mail_compose=g@sl mail_return=ϥΪ̹qll mail_ecannot=zQ\ŪoӨϥΪ̪l mail_all=ܥ mail_invert=ϦV mail_search=Ml, 䤤 mail_body= mail_match=ŦX mail_ok=jM view_title=Ūqll view_desc=l $1 b $2 view_qdesc=Cl $1 view_headers=lY view_attach=󧨱a view_reply=^ view_reply2=^е view_forward=H view_delete=R view_ecannot=zQ\ŪoӨϥΪ̪l compose_title=g@qll reply_title=^Шqll forward_title=Hqll reply_headers=lY reply_attach=H󧨱a reply_attach2=󧨱a reply_send=eX reply_ecannot=zQ\HoӨϥΪ̦WٰeXl send_err=leX send_eto=򥢦Hl} send_efrom=򥢱HHl} send_title=eXl send_ok=l󦨥\e $1 send_ecannot=zQ\HoӨϥΪ̦WٰeXl send_esmtp=SMTP RO $1 : $2 delete_ecannot=zQ\RoӨϥΪ̪l delete_enone=SܭnRl search_title=jMG search_ecannot=zQ\jMoӨϥΪ̪l search_ematch=zJjM search_none=䤣ŦXl. acl_none=L acl_all= acl_read=iHŪǨϥΪ̪l acl_users=uϥΪ acl_userse=, FϥΪ acl_from=̾ڶl}\ acl_any=l} acl_fdoms=Hcb acl_faddrs=CXl} acl_fdom=l}b mailbox/boxes-lib.pl0100644000567100000120000012443010037345267014426 0ustar jcameronwheel# boxes-lib.pl # Functions to parsing user mail files use POSIX; # list_mails(user|file, [start], [end]) # Returns a subset of mail from a mbox format file sub list_mails { local (@rv, $h, $done); local (@index, %index, $itype); $itype = &index_type($_[0]); if ($itype == 0) { @index = &build_index($_[0]); } else { &build_dbm_index($_[0], \%index); } local ($start, $end); local $isize = $itype == 0 ? scalar(@index) : $index{'mailcount'}; if (@_ == 1) { $start = 0; $end = $isize-1; } elsif ($_[2] < 0) { $start = $isize+$_[2]-1; $end = $isize+$_[1]-1; $start = $start<0 ? 0 : $start; } else { $start = $_[1]; $end = $_[2]; $end = $isize-1 if ($end >= $isize); } $rv[$isize-1] = undef if ($isize); # force array to right size local $dash = &dash_mode($_[0]); open(MAIL, &user_mail_file($_[0])); for($i=$start; $i<=$end; $i++) { local ($mail, $line, @headers); # read RFC822 headers if ($itype == 0) { seek(MAIL, $index[$i]->[0], 0); $mail->{'line'} = $index[$i]->[1]; } else { local @idx = split(/\0/, $index{$i}); seek(MAIL, $idx[0], 0); $mail->{'line'} = $idx[1]; } local $lnum = 0; while(1) { $lnum++; $line = ; $mail->{'size'} += length($line); $line =~ s/\r|\n//g; last if ($line =~ /^$/); if ($line =~ /^(\S+):\s*(.*)/) { push(@headers, [ $1, $2 ]); $mail->{'rawheaders'} .= $line."\n"; } elsif ($line =~ /^(\s+.*)/) { $headers[$#headers]->[1] .= $1 unless($#headers < 0); $mail->{'rawheaders'} .= $line."\n"; } elsif ($line =~ /^From\s+(\S+).*\d+/ && ($1 ne '-' || $dash)) { $mail->{'fromline'} = $line; } } $mail->{'headers'} = \@headers; foreach $h (@headers) { $mail->{'header'}->{lc($h->[0])} = $h->[1]; } # read the mail body while(1) { $line = ; last if (!$line || $line =~ /^From\s+(\S+).*\d+\r?\n/ && ($1 ne '-' || $dash)); $lnum++; $mail->{'size'} += length($line); $mail->{'body'} .= $line; } $mail->{'eline'} = $mail->{'line'} + $lnum - 1; $mail->{'idx'} = $i; $rv[$i] = $mail; } return @rv; } # search_mail(user, field, match) # Returns an array of messages matching some search sub search_mail { return &advanced_search_mail($_[0], [ [ $_[1], $_[2] ] ], 1); } # advanced_search_mail(user|file, &fields, andmode) # Returns an array of messages matching some search sub advanced_search_mail { local $itype = &index_type($_[0]); local (@index, %index, @rv, $i); local $dash = &dash_mode($_[0]); local @possible; # index positions of possible mails local $possible_certain = 0; # is possible list authoratative? if ($itype == 0) { # We have only a plain index .. @index = &build_index($_[0]); @possible = (0 .. scalar(@index)-1); } else { # We have a DBM index .. if the search includes the from and subject # fields, scan it first to cut down on the total time &build_dbm_index($_[0], \%index); # Check which fields are used in search local @dbmfields = grep { $_->[0] eq 'from' || $_->[0] eq 'subject' } @{$_[1]}; local $alldbm = (scalar(@dbmfields) == scalar(@{$_[1]})); # Only check DBM if it contains some fields, and if it contains all # fields when in 'or' mode. if (@dbmfields && ($alldbm || $_[2])) { # Scan the DBM to build up a list of 'possibles' for($i=0; $i<$index{'mailcount'}; $i++) { local @idx = split(/\0/, $index{$i}); local $fake = { 'header' => { 'from', $idx[2], 'subject', $idx[3] } }; local $m = &mail_matches(\@dbmfields, $_[2], $fake); push(@possible, $i) if ($m); } $possible_certain = $alldbm; } else { # None of the DBM fields are in the search .. have to scan all @possible = (0 .. $index{'mailcount'}-1); } } # Need to scan through possible messages to find those that match open(MAIL, &user_mail_file($_[0])); foreach $i (@possible) { local ($mail, $line, @headers); # read mail headers if ($itype == 0) { seek(MAIL, $index[$i]->[0], 0); $mail->{'line'} = $index[$i]->[1]; } else { local @idx = split(/\0/, $index{$i}); seek(MAIL, $idx[0], 0); $mail->{'line'} = $idx[1]; } local $lnum = 0; while(1) { $lnum++; ($line = ) =~ s/\r|\n//g; $mail->{'size'} += length($line); last if ($line =~ /^$/); if ($line =~ /^(\S+):\s*(.*)/) { push(@headers, [ $1, $2 ]); $mail->{'rawheaders'} .= $line."\n"; } elsif ($line =~ /^(\s+.*)/) { $headers[$#headers]->[1] .= $1 unless($#headers < 0); $mail->{'rawheaders'} .= $line."\n"; } elsif ($line =~ /^From\s+(\S+).*\d+/ && ($1 ne '-' || $dash)) { $mail->{'fromline'} = $line; } } $mail->{'headers'} = \@headers; foreach $h (@headers) { $mail->{'header'}->{lc($h->[0])} = $h->[1]; } # read mail body while(1) { $line = ; last if (!$line || $line =~ /^From\s+(\S+).*\d+\r?\n/ && ($1 ne '-' || $dash)); $lnum++; $mail->{'size'} += length($line); $mail->{'body'} .= $line; } $mail->{'eline'} = $mail->{'line'} + $lnum - 1; $mail->{'idx'} = $i; push(@rv, $mail) if ($possible_certain || &mail_matches($_[1], $_[2], $mail)); } return @rv; } # build_index(user|file) sub build_index { local @index; local $ifile = &user_index_file($_[0]); local $umf = &user_mail_file($_[0]); local @ist = stat($ifile); local @st = stat($umf); if (open(INDEX, $ifile)) { @index = map { /(\d+)\s+(\d+)/; [ $1, $2 ] } ; close(INDEX); } if (!@ist || !@st || $ist[9] < $st[9] || $st[7] < $config{'index_min'}) { # The mail file is newer than the index, or we are always re-indexing local $fromok = 1; local ($l, $ll); local $dash = &dash_mode($umf); if ($st[7] < $config{'index_min'}) { $fromok = 0; # Always re-index open(MAIL, $umf); } else { if (open(MAIL, $umf)) { local $il = $#index; local $i; for($i=($il>100 ? 100 : $il); $i>=0; $i--) { $l = $index[$il-$i]; seek(MAIL, $index[$il-$i]->[0], 0); $ll = ; $fromok = 0 if ($ll !~ /^From\s+(\S+).*\d+\r?\n/ || ($1 eq '-' && !$dash)); } } else { $fromok = 0; # No mail file yet } } local ($pos, $lnum); if (scalar(@index) && $fromok && $st[7] > $l->[0]) { # Mail file seems to have gotten bigger, most likely # because new mail has arrived ... only reindex the new mails $pos = $l->[0] + length($ll); $lnum = $l->[1] + 1; } else { # Mail file has changed in some other way ... do a rebuild $pos = 0; $lnum = 0; undef(@index); seek(MAIL, 0, 0); } while() { if (/^From\s+(\S+).*\d+\r?\n/ && ($1 ne '-' || $dash)) { push(@index, [ $pos, $lnum ]); } $pos += length($_); $lnum++; } close(MAIL); open(INDEX, ">$ifile"); print INDEX map { $_->[0]." ".$_->[1]."\n" } @index; close(INDEX); } return @index; } # build_dbm_index(user|file, &index) # Returns a reference to a DBM hash that indexes the given mail file. # Hash contains keys 0, 1, 2 .. each of which has a value containing the # position of the mail in the file, line number, subject and sender. # Special key lastchange = time index was last updated # mailcount = number of messages in index sub build_dbm_index { local $ifile = &user_index_file($_[0]); local $umf = &user_mail_file($_[0]); local @st = stat($umf); local $index = $_[1]; dbmopen(%$index, $ifile, 0600); if (!@st || $index->{'lastchange'} < $st[9] || $st[7] < $config{'index_min'}) { # The mail file is newer than the index, or we are always re-indexing local $fromok = 1; local ($ll, @idx); local $dash = &dash_mode($umf); if ($st[7] < $config{'index_min'}) { $fromok = 0; # Always re-index open(MAIL, $umf); } else { if (open(MAIL, $umf)) { # Check the last 100 messages (at most) local $il = $index->{'mailcount'}-1; local $i; for($i=($il>100 ? 100 : $il); $i>=0; $i--) { @idx = split(/\0/, $index->{$il-$i}); seek(MAIL, $idx[0], 0); $ll = ; $fromok = 0 if ($ll !~ /^From\s+(\S+).*\d+\r?\n/ || ($1 eq '-' && !$dash)); } } else { $fromok = 0; # No mail file yet } } local ($pos, $lnum, $istart); if ($index->{'mailcount'} && $fromok && $st[7] > $idx[0]) { # Mail file seems to have gotten bigger, most likely # because new mail has arrived ... only reindex the new mails $pos = $idx[0] + length($ll); $lnum = $idx[1] + 1; $istart = $index->{'mailcount'}; } else { # Mail file has changed in some other way ... do a rebuild $istart = 0; $pos = 0; $lnum = 0; seek(MAIL, 0, 0); } local ($doingheaders, @nidx); while() { if (/^From\s+(\S+).*\d+\r?\n/ && ($1 ne '-' || $dash)) { @nidx = ( $pos, $lnum ); $index->{$istart++} = join("\0", @nidx); $doingheaders = 1; } elsif ($_ eq "\n" || $_ eq "\r\n") { $doingheaders = 0; } elsif ($doingheaders && /^From:\s*(.{0,255})/) { $nidx[2] = $1; $index->{$istart-1} = join("\0", @nidx); } elsif ($doingheaders && /^Subject:\s*(.{0,255})/) { $nidx[3] = $1; $index->{$istart-1} = join("\0", @nidx); } $pos += length($_); $lnum++; } close(MAIL); $index->{'lastchange'} = time(); $index->{'mailcount'} = $istart; } } # index_type(user|file) # Returns 0 if an old-style index exists for some mailbox, 1 if not (indicating # that DBM indexing should be used) sub index_type { return 0 if (!$config{'index_dbm'}); return 1 if ($config{'index_dbm'} == 2); local $ifile = &user_index_file($_[0]); return -r $ifile ? 0 : 1; } # empty_mail(user|file) # Truncate a mail file to nothing sub empty_mail { local $umf = &user_mail_file($_[0]); local $itype = &index_type($_[0]); local $ifile = &user_index_file($_[0]); open(TRUNC, ">$umf"); close(TRUNC); if ($itype == 0) { # Truncate index too open(TRUNC, ">$ifile"); close(TRUNC); } else { # Set index size to 0 local %index; dbmopen(%index, $ifile, 0600); $index{'mailcount'} = 0; $index{'lastchange'} = time(); dbmclose(%index); } } # parse_mail(&mail, [&parent], [savebody]) # Extracts the attachments from the mail body sub parse_mail { return if ($_[0]->{'parsed'}++); local $ct = $_[0]->{'header'}->{'content-type'}; local (@attach, $h, $a); if ($ct =~ /multipart\/(\S+)/i && ($ct =~ /boundary="([^"]+)"/i || $ct =~ /boundary=([^;\s]+)/i)) { # Multipart MIME message local $bound = "--".$1; local @lines = split(/\r?\n/, $_[0]->{'body'}); local $l; local $max = @lines; while($l < $max && $lines[$l++] ne $bound) { # skip to first boundary } while(1) { # read attachment headers local (@headers, $attach); while($lines[$l]) { $attach->{'raw'} .= $lines[$l]."\n"; $attach->{'rawheaders'} .= $lines[$l]."\n"; if ($lines[$l] =~ /^(\S+):\s*(.*)/) { push(@headers, [ $1, $2 ]); } elsif ($lines[$l] =~ /^(\s+.*)/) { $headers[$#headers]->[1] .= $1 unless($#headers < 0); } $l++; } $attach->{'raw'} .= $lines[$l]."\n"; $l++; $attach->{'headers'} = \@headers; foreach $h (@headers) { $attach->{'header'}->{lc($h->[0])} = $h->[1]; } if ($attach->{'header'}->{'content-type'} =~ /^([^;]+)/) { $attach->{'type'} = lc($1); } else { $attach->{'type'} = 'text/plain'; } if ($attach->{'header'}->{'content-disposition'} =~ /filename\s*=\s*"([^"]+)"/i) { $attach->{'filename'} = $1; } elsif ($attach->{'header'}->{'content-disposition'} =~ /filename\s*=\s*([^;\s]+)/i) { $attach->{'filename'} = $1; } elsif ($attach->{'header'}->{'content-type'} =~ /name\s*=\s*"([^"]+)"/i) { $attach->{'filename'} = $1; } # read the attachment body while($l < $max && $lines[$l] ne $bound && $lines[$l] ne "$bound--") { $attach->{'data'} .= $lines[$l]."\n"; $attach->{'raw'} .= $lines[$l]."\n"; $l++; } $attach->{'data'} =~ s/\n\n$/\n/; # Lose trailing blank line $attach->{'raw'} =~ s/\n\n$/\n/; # decode if necessary if (lc($attach->{'header'}->{'content-transfer-encoding'}) eq 'base64') { # Standard base64 encoded attachment $attach->{'data'} = &b64decode($attach->{'data'}); } elsif (lc($attach->{'header'}->{'content-transfer-encoding'}) eq 'x-uue') { # UUencoded attachment $attach->{'data'} = &uudecode($attach->{'data'}); } elsif (lc($attach->{'header'}->{'content-transfer-encoding'}) eq 'quoted-printable') { # Quoted-printable text attachment $attach->{'data'} = "ed_decode($attach->{'data'}); } elsif (lc($attach->{'type'}) eq 'application/mac-binhex40' && &has_command("hexbin")) { # Macintosh binhex encoded attachment local $temp = &tempname(); mkdir($temp, 0700); open(HEXBIN, "| (cd $temp ; hexbin -n attach -d 2>/dev/null)"); print HEXBIN $attach->{'data'}; close(HEXBIN); if (!$?) { open(HEXBIN, "$temp/attach.data"); local $/ = undef; $attach->{'data'} = ; close(HEXBIN); local $ct = &guess_type($attach->{'filename'}); $attach->{'type'} = $ct; $attach->{'header'} = { 'content-type' => $ct }; $attach->{'headers'} = [ [ 'Content-Type', $ct ] ]; } unlink("$temp/attach.data"); rmdir($temp); } $attach->{'idx'} = scalar(@attach); $attach->{'parent'} = $_[1] ? $_[1] : $_[0]; push(@attach, $attach) if (@headers || $attach->{'data'}); if ($attach->{'type'} =~ /multipart\/(\S+)/i) { # This attachment contains more attachments .. # expand them. local $amail = { 'header' => $attach->{'header'}, 'body' => $attach->{'data'} }; &parse_mail($amail, $attach); $attach->{'attach'} = [ @{$amail->{'attach'}} ]; map { $_->{'idx'} += scalar(@attach) } @{$amail->{'attach'}}; push(@attach, @{$amail->{'attach'}}); } elsif (lc($attach->{'type'}) eq 'application/ms-tnef') { # This attachment is a winmail.dat file, which may # contain multiple other attachments! local ($opentnef, $tnef); if (!($opentnef = &has_command("opentnef")) && !($tnef = &has_command("opentnef"))) { $attach->{'error'} = "tnef command not installed"; } else { # Can actually decode local $tempfile = &tempname(); open(TEMPFILE, ">$tempfile"); print TEMPFILE $attach->{'data'}; close(TEMPFILE); local $tempdir = &tempname(); mkdir($tempdir, 0700); if ($opentnef) { system("$opentnef -d $tempdir -i $tempfile >/dev/null 2>&1"); } else { system("$tnef -C $tempdir -f $tempfile >/dev/null 2>&1"); } pop(@attach); # lose winmail.dat opendir(DIR, $tempdir); while($f = readdir(DIR)) { next if ($f eq '.' || $f eq '..'); local $data; open(FILE, "$tempdir/$f"); while() { $data .= $_; } close(FILE); local $ct = &guess_type($f); push(@attach, { 'type' => $ct, 'idx' => scalar(@attach), 'header' => { 'content-ype' => $ct }, 'headers' => [ [ 'Content-Type', $ct ] ], 'filename' => $f, 'data' => $data }); } closedir(DIR); unlink(glob("$tempdir/*"), $tempfile); rmdir($tempdir); } } last if ($l >= $max || $lines[$l] eq "$bound--"); $l++; } $_[0]->{'attach'} = \@attach; } elsif ($_[0]->{'body'} =~ /begin\s+([0-7]+)\s+(.*)/i) { # Message contains uuencoded file(s) local @lines = split(/\n/, $_[0]->{'body'}); local ($attach, $rest); foreach $l (@lines) { if ($l =~ /^begin\s+([0-7]+)\s+(.*)/i) { $attach = { 'type' => &guess_type($2), 'idx' => scalar(@{$_[0]->{'attach'}}), 'parent' => $_[1], 'filename' => $2 }; push(@{$_[0]->{'attach'}}, $attach); } elsif ($l =~ /^end/ && $attach) { $attach = undef; } elsif ($attach) { $attach->{'data'} .= unpack("u", $l); } else { $rest .= $l."\n"; } } if ($rest =~ /\S/) { # Some leftover text push(@{$_[0]->{'attach'}}, { 'type' => "text/plain", 'idx' => scalar(@{$_[0]->{'attach'}}), 'parent' => $_[1], 'data' => $rest }); } } elsif (lc($_[0]->{'header'}->{'content-transfer-encoding'}) eq 'base64') { # Signed body section $ct =~ s/;.*$//; $_[0]->{'attach'} = [ { 'type' => lc($ct), 'idx' => 0, 'parent' => $_[1], 'data' => &b64decode($_[0]->{'body'}) } ]; } else { # One big attachment (probably text) local ($type, $body); ($type = $ct) =~ s/;.*$//; $type = 'text/plain' if (!$type); if (lc($_[0]->{'header'}->{'content-transfer-encoding'}) eq 'base64') { $body = &b64decode($_[0]->{'body'}); } elsif (lc($_[0]->{'header'}->{'content-transfer-encoding'}) eq 'quoted-printable') { $body = "ed_decode($_[0]->{'body'}); } else { $body = $_[0]->{'body'}; } $_[0]->{'attach'} = [ { 'type' => lc($type), 'idx' => 0, 'parent' => $_[1], 'data' => $body } ]; } delete($_[0]->{'body'}) if (!$_[2]); } # delete_mail(user|file, &mail, ...) # Delete mail messages from a user by copying the file and rebuilding the index sub delete_mail { local @m = sort { $a->{'line'} <=> $b->{'line'} } @_[1..@_-1]; local $i = 0; local $f = &user_mail_file($_[0]); local $ifile = &user_index_file($_[0]); local $itype = &index_type($_[0]); local $lnum = 0; local %dline; local ($dpos = 0, $dlnum = 0); local (@index, %index); if ($itype == 1) { &build_dbm_index($_[0], \%index); } local $tmpf = $< == 0 ? "$f.del" : $_[0] =~ /^\/.*\/([^\/]+)$/ ? "$user_module_config_directory/$1.del" : "$user_module_config_directory/$_[0].del"; open(SOURCE, $f) || &error("Read failed : $!"); open(DEST, ">$tmpf") || &error("Open of $tmpf failed : $!"); while() { if ($i >= @m || $lnum < $m[$i]->{'line'}) { if ($itype == 0 && /^From\s+(\S+).*\d+\r?\n/ && ($1 ne '-' || $dash)) { push(@index, [ $dpos, $dlnum ]); } $dpos += length($_); $dlnum++; local $w = (print DEST $_); if (!$w) { local $e = "$?"; close(DEST); close(SOURCE); unlink($tmpf); &error("Write to $tmpf failed : $e"); } } elsif ($lnum == $m[$i]->{'eline'}) { $dline{$m[$i]->{'line'}}++; $i++; } $lnum++; } close(SOURCE); close(DEST) || &error("Write to $tmpf failed : $?"); local @st = stat($f); unlink($f); if ($itype == 0) { open(INDEX, ">$ifile"); print INDEX map { $_->[0]." ".$_->[1]."\n" } @index; close(INDEX); } else { # Just force a total index re-build (XXX lazy!) $index{'mailcount'} = $in{'lastchange'} = 0; } if ($< == 0) { rename($tmpf, $f); } else { system("cat '$tmpf' > '$f' && rm -f '$tmpf'"); } chown($st[4], $st[5], $f); chmod($st[2], $f); } # modify_mail(user|file, old, new, textonly) # Modify one email message in a mailbox by copying the file and rebuilding # the index. sub modify_mail { local $f = &user_mail_file($_[0]); local $ifile = &user_index_file($_[0]); local $itype = &index_type($_[0]); local $lnum = 0; local ($sizediff, $linesdiff); local (@index, %index); if ($itype == 0) { @index = &build_index($_[0]); } else { &build_dbm_index($_[0], \%index); } # Replace the email that gets modified local $tmpf = $< == 0 ? "$f.del" : $_[0] =~ /^\/.*\/([^\/]+)$/ ? "$user_module_config_directory/$1.del" : "$user_module_config_directory/$_[0].del"; open(SOURCE, $f); open(DEST, ">$tmpf"); while() { if ($lnum < $_[1]->{'line'} || $lnum > $_[1]->{'eline'}) { # before or after the message to change local $w = (print DEST $_); if (!$w) { local $e = "$?"; close(DEST); close(SOURCE); unlink($tmpf); &error("Write to $tmpf failed : $e"); } } elsif ($lnum == $_[1]->{'line'}) { # found start of message to change .. put in the new one close(DEST); local @ost = stat($tmpf); local $nlines = &send_mail($_[2], $tmpf, $_[3], 1); local @nst = stat($tmpf); local $newsize = $nst[7] - $ost[7]; $sizediff = $newsize - $_[1]->{'size'}; $linesdiff = $nlines - ($_[1]->{'eline'} - $_[1]->{'line'} + 1); open(DEST, ">>$tmpf"); } $lnum++; } close(SOURCE); close(DEST) || &error("Write failed : $!"); # Now update the index and delete the temp file if ($itype == 0) { # Update old-style index foreach $i (@index) { if ($i->[1] > $_[1]->{'line'}) { # Shift mails after the modified $i->[0] += $sizediff; $i->[1] += $linesdiff; } } } else { # Update DBM index for($i=0; $i<$index{'mailcount'}; $i++) { local @idx = split(/\0/, $index{$i}); if ($idx[1] > $_[1]->{'line'}) { $idx[0] += $sizediff; $idx[1] += $linesdiff; $index{$i} = join("\0", @idx); } } $index{'lastchange'} = time(); } local @st = stat($f); unlink($f); if ($itype == 0) { open(INDEX, ">$ifile"); print INDEX map { $_->[0]." ".$_->[1]."\n" } @index; close(INDEX); } if ($< == 0) { rename($tmpf, $f); } else { system("cat $tmpf >$f && rm -f $tmpf"); } chown($st[4], $st[5], $f); chmod($st[2], $f); } # send_mail(&mail, [file], [textonly], [nocr], [smtp-server], [smtp-user], [smtp-pass]) # Send out some email message or append it to a file. # Returns the number of lines written. sub send_mail { local (%header, $h); local $eol = $_[3] ? "\n" : "\r\n"; local $lnum = 0; local $sm = $_[4] || $config{'send_mode'}; foreach $h (@{$_[0]->{'headers'}}) { $header{lc($h->[0])} = $h->[1]; } local @from = &address_parts($header{'from'}); if ($_[1]) { # Just append the email to a file using mbox format local @tm = localtime(time()); open(MAIL, ">>$_[1]") || &error("Write failed : $!"); $lnum++; print MAIL $_[0]->{'fromline'} ? $_[0]->{'fromline'}."\n" : strftime("From $from[0] %a %b %e %H:%M:%S %Y\n", @tm); push(@{$_[0]->{'headers'}}, [ 'Date', strftime("%a, %d %b %Y %H:%M:%S %Z", @tm) ]) if (!$header{'date'}); } elsif ($sm) { # Connect to SMTP server &open_socket($sm, 25, MAIL); &smtp_command(MAIL); &smtp_command(MAIL, "helo ".&get_system_hostname()."\r\n"); # XXX do SMTP auth here? # XXX get username and password from parameters, or from module config local $user = $_[5] || $userconfig{'smtp_user'} || $config{'smtp_user'}; local $pass = $_[6] || $userconfig{'smtp_pass'} || $config{'smtp_pass'}; if ($user) { # Send authentication commands # XXX format? } &smtp_command(MAIL, "mail from: <$from[0]>\r\n"); local $u; foreach $u (&address_parts($header{'to'}.",".$header{'cc'}. ",".$header{'bcc'})) { &smtp_command(MAIL, "rcpt to: <$u>\r\n"); } &smtp_command(MAIL, "data\r\n"); } elsif (defined(&send_mail_program)) { # Use specified mail injector local $cmd = &send_mail_program($from[0]); $cmd || &error("No mail program was found on your system!"); open(MAIL, "| $cmd >/dev/null 2>&1"); } elsif ($config{'qmail_dir'}) { # Start qmail open(MAIL, "| $config{'qmail_dir'}/bin/qmail-inject"); } elsif ($config{'postfix_control_command'}) { # Start postfix's sendmail wrapper local $cmd = -x "/usr/lib/sendmail" ? "/usr/lib/sendmail" : &has_command("sendmail"); $cmd || &error($text{'send_ewrapper'}); open(MAIL, "| $cmd -t -f$from[0] >/dev/null 2>&1"); } else { # Start sendmail &has_command($config{'sendmail_path'}) || &error(&text('send_epath', "$config{'sendmail_path'}")); open(MAIL, "| $config{'sendmail_path'} -t -f$from[0] >/dev/null 2>&1"); } local $ctype = "multipart/mixed"; local $msg_id; foreach $h (@{$_[0]->{'headers'}}) { if (defined($_[0]->{'body'}) || $_[2]) { print MAIL $h->[0],": ",$h->[1],$eol; $lnum++; } else { if ($h->[0] !~ /^(MIME-Version|Content-Type)$/i) { print MAIL $h->[0],": ",$h->[1],$eol; $lnum++; } elsif (lc($h->[0]) eq 'content-type') { $ctype = $h->[1]; } } if (lc($h->[0]) eq 'message-id') { $msg_id++; } } if (!$msg_id) { # Add a message-id header if missing print MAIL "Message-Id: <",time().".".$$."\@". &get_system_hostname(),">",$eol; } if (defined($_[0]->{'body'})) { # Use original mail body print MAIL $eol; $lnum++; $_[0]->{'body'} =~ s/\r//g; $_[0]->{'body'} =~ s/\n/$eol/g; $_[0]->{'body'} .= $eol if ($_[0]->{'body'} !~ /\n$/); (print MAIL $_[0]->{'body'}) || &error("Write failed : $!"); $lnum += ($_[0]->{'body'} =~ tr/\n/\n/); } elsif (!$_[2]) { # Sending MIME-encoded email $ctype =~ s/;.*$//; print MAIL "MIME-Version: 1.0",$eol; local $bound = "bound".time(); print MAIL "Content-Type: $ctype; boundary=\"$bound\"",$eol; print MAIL $eol; $lnum += 3; # Send attachments print MAIL "This is a multi-part message in MIME format.",$eol; $lnum++; foreach $a (@{$_[0]->{'attach'}}) { print MAIL $eol; print MAIL "--",$bound,$eol; $lnum += 2; local $enc; foreach $h (@{$a->{'headers'}}) { print MAIL $h->[0],": ",$h->[1],$eol; $enc = $h->[1] if (lc($h->[0]) eq 'content-transfer-encoding'); $lnum++; } print MAIL $eol; $lnum++; if (lc($enc) eq 'base64') { local $enc = &encode_base64($a->{'data'}); $enc =~ s/\r//g; $enc =~ s/\n/$eol/g; print MAIL $enc; $lnum += ($enc =~ tr/\n/\n/); } else { $a->{'data'} =~ s/\r//g; $a->{'data'} =~ s/\n/$eol/g; print MAIL $a->{'data'}; $lnum += ($a->{'data'} =~ tr/\n/\n/); if ($a->{'data'} !~ /\n$/) { print MAIL $eol; $lnum++; } } } print MAIL $eol; (print MAIL "--",$bound,"--",$eol) || &error("Write failed : $!"); print MAIL $eol; $lnum += 3; } else { # Sending text-only mail from first attachment local $a = $_[0]->{'attach'}->[0]; print MAIL $eol; $lnum++; $a->{'data'} =~ s/\r//g; $a->{'data'} =~ s/\n/$eol/g; (print MAIL $a->{'data'}) || &error("Write failed : $!"); $lnum += ($a->{'data'} =~ tr/\n/\n/); if ($a->{'data'} !~ /\n$/) { print MAIL $eol; $lnum++; } } if ($sm && !$_[1]) { &smtp_command(MAIL, ".$eol"); &smtp_command(MAIL, "quit$eol"); } if (!close(MAIL)) { # Only bother to report an error on close if writing to a file if ($_[1]) { &error("Write failed : $!"); } } return $lnum; } # b64decode(string) # Converts a string from base64 format to normal sub b64decode { local($str) = $_[0]; local($res); $str =~ tr|A-Za-z0-9+=/||cd; $str =~ s/=+$//; $str =~ tr|A-Za-z0-9+/| -_|; while ($str =~ /(.{1,60})/gs) { my $len = chr(32 + length($1)*3/4); $res .= unpack("u", $len . $1 ); } return $res; } sub guess_type { local $e; if (!%mime_types) { open(MIME, "$root_directory/mime.types"); while() { s/\r|\n//g; s/#.*$//g; local @s = split(/\s+/); foreach $e (@s[1..$#s]) { $mime_types{$e} = $s[0]; } } close(MIME); } if ($_[0] =~ /\.([A-z0-9]+)$/ && $mime_types{lc($1)}) { return $mime_types{lc($1)}; } return "application/octet-stream"; } # can_read_mail(user) sub can_read_mail { return 1 if ($_[0] && $access{'sent'} eq $_[0]); local @u = getpwnam($_[0]); return 0 if (!@u); return 0 if ($_[0] =~ /\.\./); return 0 if ($access{'mmode'} == 0); return 1 if ($access{'mmode'} == 1); local $u; if ($access{'mmode'} == 2) { foreach $u (split(/\s+/, $access{'musers'})) { return 1 if ($u eq $_[0]); } return 0; } elsif ($access{'mmode'} == 4) { return 1 if ($_[0] eq $remote_user); } elsif ($access{'mmode'} == 5) { return $u[3] eq $access{'musers'}; } elsif ($access{'mmode'} == 3) { foreach $u (split(/\s+/, $access{'musers'})) { return 0 if ($u eq $_[0]); } return 1; } elsif ($access{'mmode'} == 6) { return ($_[0] =~ /^$access{'musers'}$/); } elsif ($access{'mmode'} == 7) { return (!$access{'musers'} || $u[2] >= $access{'musers'}) && (!$access{'musers2'} || $u[2] <= $access{'musers2'}); } return 0; # can't happen! } # from_hostname() sub from_hostname { local ($d, $masq); local $conf = &get_sendmailcf(); foreach $d (&find_type("D", $conf)) { if ($d->{'value'} =~ /^M\s*(\S*)/) { $masq = $1; } } return $masq ? $masq : &get_system_hostname(); } # mail_from_queue(qfile, [dfile]) sub mail_from_queue { local $mail = { 'file' => $_[0] }; $mail->{'dfile'} = $_[1] if ($_[1]); local $_; local @headers; open(QF, $_[0]) || return undef; while() { s/\r|\n//g; if (/^M(.*)/) { $mail->{'status'} = $1; } elsif (/^H\?[^\?]*\?(\S+):\s+(.*)/ || /^H(\S+):\s+(.*)/) { push(@headers, [ $1, $2 ]); $mail->{'rawheaders'} .= "$1: $2\n"; } elsif (/^(\s+.*)/) { $headers[$#headers]->[1] .= $1 unless($#headers < 0); $mail->{'rawheaders'} .= $_."\n"; } } close(QF); $mail->{'headers'} = \@headers; foreach $h (@headers) { $mail->{'header'}->{lc($h->[0])} = $h->[1]; } if ($_[1]) { # Read the mail body open(DF, $_[1]); while() { $mail->{'body'} .= $_; } close(DF); } local @st0 = stat($_[0]); local @st1; if ($_[1]) { @st1 = stat($_[1]); } else { local $df = $_[0]; $df =~ s/\/qf/\/df/; @st1 = stat($df); } $mail->{'size'} = $st0[7] + $st1[7]; return $mail; } # wrap_lines(text, width) # Given a multi-line string, return an array of lines wrapped to # the given width sub wrap_lines { local @rv; local $w = $_[1]; foreach $rest (split(/\n/, $_[0])) { if ($rest =~ /\S/) { while($rest =~ /^(.{1,$w}\S*)\s*([\0-\377]*)$/) { push(@rv, $1); $rest = $2; } } else { # Empty line .. keep as it is push(@rv, $rest); } } return @rv; } # smtp_command(handle, command) sub smtp_command { local ($m, $c) = @_; print $m $c; local $r = <$m>; if ($r !~ /^[23]\d+/) { &error(&text('send_esmtp', "".&html_escape($c)."", "".&html_escape($r)."")); } } # address_parts(string) sub address_parts { local @rv; local $rest = $_[0]; while($rest =~ /([^<>\s,'"\@]+\@[A-z0-9\-\.\!]+)(.*)/) { push(@rv, $1); $rest = $2; } return wantarray ? @rv : $rv[0]; } # link_urls(text) sub link_urls { local $r = $_[0]; $r =~ s/((http|ftp|https|mailto):[^><"'\s]+[^><"'\s\.\)])/$1<\/a>/g; return $r; } # link_urls_and_escape(text) # HTML escapes some text, as well as properly linking URLs in it sub link_urls_and_escape { local $l = $_[0]; local $rv; while($l =~ /^(.*?)((http|ftp|https|mailto):[^><"'\s]+[^><"'\s\.\)])(.*)/) { local ($before, $url, $after) = ($1, $2, $4); $rv .= &eucconv(&html_escape($before))."". &html_escape($url).""; $l = $after; } $rv .= &eucconv(&html_escape($l)); return $rv; } # uudecode(text) sub uudecode { local @lines = split(/\n/, $_[0]); local ($l, $data); for($l=0; $lines[$l] !~ /begin\s+([0-7]+)\s/i; $l++) { } while($lines[++$l]) { $data .= unpack("u", $lines[$l]); } return $data; } sub simplify_date { if ($_[0] =~ /^(\S+),\s+0*(\d+)\s+(\S+)\s+(\d+)\s+(\d+):(\d+)/) { return "$2/$3/$4 $5:$6"; } return $_[0]; } # simplify_from(from) # Simplifies a From: address for display in the mail list. Only the first # address is returned. sub simplify_from { local $rv = &eucconv(&decode_mimewords($_[0])); local @sp = &split_addresses($rv); if (!@sp) { return $text{'mail_nonefrom'}; } else { local $first = &html_escape($sp[0]->[1] ? $sp[0]->[1] : $sp[0]->[2]); if (length($first) > 80) { return substr($first, 0, 80)." .."; } else { return $first.(@sp > 1 ? " , ..." : ""); } } } # simplify_subject(subject) sub simplify_subject { local $rv = &eucconv(&decode_mimewords($_[0])); $rv = substr($rv, 0, 80)." .." if (length($rv) > 80); return $rv =~ /\S/ ? &html_escape($rv) : "
"; } # quoted_decode(text) sub quoted_decode { local $t = $_[0]; $t =~ s/=\n//g; $t =~ s/=(\S\S)/pack("c",hex($1))/ge; return $t; } # quoted_encode(text) sub quoted_encode { local $t = $_[0]; $t =~ s/([=\177-\377])/sprintf("=%2.2X",ord($1))/ge; return $t; } sub decode_mimewords { my $encstr = shift; my %params = @_; my @tokens; $@ = ''; ### error-return ### Collapse boundaries between adjacent encoded words: $encstr =~ s{(\?\=)\r?\n[ \t](\=\?)}{$1$2}gs; pos($encstr) = 0; ### print STDOUT "ENC = [", $encstr, "]\n"; ### Decode: my ($charset, $encoding, $enc, $dec); while (1) { last if (pos($encstr) >= length($encstr)); my $pos = pos($encstr); ### save it ### Case 1: are we looking at "=?..?..?="? if ($encstr =~ m{\G # from where we left off.. =\?([^?]*) # "=?" + charset + \?([bq]) # "?" + encoding + \?([^?]+) # "?" + data maybe with spcs + \?= # "?=" }xgi) { ($charset, $encoding, $enc) = ($1, lc($2), $3); $dec = (($encoding eq 'q') ? _decode_Q($enc) : _decode_B($enc)); push @tokens, [$dec, $charset]; next; } ### Case 2: are we looking at a bad "=?..." prefix? ### We need this to detect problems for case 3, which stops at "=?": pos($encstr) = $pos; # reset the pointer. if ($encstr =~ m{\G=\?}xg) { $@ .= qq|unterminated "=?..?..?=" in "$encstr" (pos $pos)\n|; push @tokens, ['=?']; next; } ### Case 3: are we looking at ordinary text? pos($encstr) = $pos; # reset the pointer. if ($encstr =~ m{\G # from where we left off... ([\x00-\xFF]*? # shortest possible string, \n*) # followed by 0 or more NLs, (?=(\Z|=\?)) # terminated by "=?" or EOS }xg) { length($1) or die "MIME::Words: internal logic err: empty token\n"; push @tokens, [$1]; next; } ### Case 4: bug! die "MIME::Words: unexpected case:\n($encstr) pos $pos\n\t". "Please alert developer.\n"; } return join('',map {$_->[0]} @tokens); } # _decode_Q STRING # Private: used by _decode_header() to decode "Q" encoding, which is # almost, but not exactly, quoted-printable. :-P sub _decode_Q { my $str = shift; $str =~ s/_/\x20/g; # RFC-1522, Q rule 2 $str =~ s/=([\da-fA-F]{2})/pack("C", hex($1))/ge; # RFC-1522, Q rule 1 $str; } # _decode_B STRING # Private: used by _decode_header() to decode "B" encoding. sub _decode_B { my $str = shift; &decode_base64($str); } # user_mail_file(user|file, [other details]) sub user_mail_file { if ($_[0] =~ /^\//) { return $_[0]; } elsif ($config{'mail_dir'}) { return &mail_file_style($_[0], $config{'mail_dir'}, $config{'mail_style'}); } elsif (@_ > 1) { return "$_[7]/$config{'mail_file'}"; } else { local @u = getpwnam($_[0]); return "$u[7]/$config{'mail_file'}"; } } # mail_file_style(user, basedir, style) sub mail_file_style { if ($_[2] == 0) { return "$_[1]/$_[0]"; } elsif ($_[2] == 1) { return $_[1]."/".substr($_[0], 0, 1)."/".$_[0]; } elsif ($_[2] == 2) { return $_[1]."/".substr($_[0], 0, 1)."/". substr($_[0], 0, 2)."/".$_[0]; } else { return $_[1]."/".substr($_[0], 0, 1)."/". substr($_[0], 1, 1)."/".$_[0]; } } # user_index_file(user|file) sub user_index_file { local $us = $_[0]; $us =~ s/\//_/g; local $f = $_[0] =~ /^\/.*\/([^\/]+)$/ ? ($user_module_config_directory ? "$user_module_config_directory/$1.findex" : "$module_config_directory/$us.findex") : $user_module_config_directory ? "$user_module_config_directory/$_[0].index" : "$module_config_directory/$_[0].index"; local $hn = &get_system_hostname(); return -r $f && !-r "$f.$hn" ? $f : "$f.$hn"; } # extract_mail(data) # Converts the text of a message into mail object. sub extract_mail { local ($amail, @aheaders, $i); local @alines = split(/\n/, $_[0]); while($i < @alines && $alines[$i]) { if ($alines[$i] =~ /^(\S+):\s*(.*)/) { push(@aheaders, [ $1, $2 ]); $amail->{'rawheaders'} .= $alines[$i]."\n"; } elsif ($alines[$i] =~ /^(\s+.*)/) { $aheaders[$#aheaders]->[1] .= $1 unless($#aheaders < 0); $amail->{'rawheaders'} .= $alines[$i]."\n"; } $i++; } $amail->{'headers'} = \@aheaders; foreach $h (@aheaders) { $amail->{'header'}->{lc($h->[0])} = $h->[1]; } splice(@alines, 0, $i); $amail->{'body'} = join("\n", @alines)."\n"; return $amail; } # split_addresses(string) # Splits a comma-separated list of addresses into [ email, real-name, original ] # triplets sub split_addresses { local (@rv, $str = $_[0]); while(1) { if ($str =~ /^[\s,]*(([^<>\(\)\s]+)\s+\(([^\(\)]+)\))(.*)$/) { # An address like foo@bar.com (Fooey Bar) push(@rv, [ $2, $3, $1 ]); $str = $4; } elsif ($str =~ /^[\s,]*("([^"]+)"\s*<([^\s<>,]+)>)(.*)$/ || $str =~ /^[\s,]*(([^<>]+)\s+<([^\s<>,]+)>)(.*)$/ || $str =~ /^[\s,]*(([^<>\[\]]+)\s+\[mailto:([^\s\[\]]+)\])(.*)$/|| $str =~ /^[\s,]*(()<([^<>,]+)>)(.*)/ || $str =~ /^[\s,]*(()([^\s<>,]+))(.*)/) { # Addresses like "Fooey Bar" # Fooey Bar # Fooey Bar [mailto:foo@bar.com] # # # foo@bar.com push(@rv, [ $3, $2, $1 ]); $str = $4; } else { last; } } return @rv; } $match_ascii = '\x1b\([BHJ]([\t\x20-\x7e]*)'; $match_jis = '\x1b\$[@B](([\x21-\x7e]{2})*)'; sub eucconv { local($_) = @_; if ($current_lang eq 'ja_JP.euc') { s/$match_jis/&j2e($1)/geo; s/$match_ascii/$1/go; } $_; } sub j2e { local($_) = @_; tr/\x21-\x7e/\xa1-\xfe/; $_; } # list_maildir(file, [start], [end]) # Returns a subset of mail from a maildir format directory sub list_maildir { local (@rv, $i, $f, @files); foreach $d ("$_[0]/cur", "$_[0]/new") { opendir(DIR, $d); while($f = readdir(DIR)) { push(@files, "$d/$f") if ($f !~ /^\./); } closedir(DIR); } @files = sort { $a =~ /([^\/]+)$/; local $an = $1; $b =~ /([^\/]+)$/; local $bn = $1; $an cmp $bn } @files; local ($start, $end); if (!defined($_[1])) { $start = 0; $end = @files - 1; } elsif ($_[2] < 0) { $start = @files + $_[2] - 1; $end = @files + $_[1] - 1; $start = 0 if ($start < 0); } else { $start = $_[1]; $end = $_[2]; $end = @files-1 if ($end >= @files); } foreach $f (@files) { if ($i < $start || $i > $end) { # Skip files outside requested index range push(@rv, undef); $i++; next; } local $mail = &read_mail_file($f); $mail->{'idx'} = $i++; push(@rv, $mail); } return @rv; } # search_maildir(file, field, what) # Search for messages in a maildir directory, and return the results sub search_maildir { return &advanced_search_maildir($_[0], [ [ $_[1], $_[2] ] ], 1); } # advanced_search_maildir(user|file, &fields, andmode) # Search for messages in a maildir directory, and return the results sub advanced_search_maildir { local @rv; foreach $mail (&list_maildir($_[0])) { push(@rv, $mail) if (&mail_matches($_[1], $_[2], $mail)); } return @rv; } # delete_maildir(&mail, ...) # Delete messages from a maildir directory sub delete_maildir { local $m; foreach $m (@_) { unlink($m->{'file'}); } } # modify_maildir(&oldmail, &newmail, textonly) # Replaces a message in a maildir directory sub modify_maildir { unlink($_[0]->{'file'}); &send_mail($_[1], $_[0]->{'file'}, $_[2], 1); } # write_maildir(&mail, directory, textonly) # Adds some message in maildir format to a directory sub write_maildir { local $now = time(); local $hn = &get_system_hostname(); local $mf; mkdir($_[1], 0755); mkdir("$_[1]/cur", 0755); do { $mf = "$_[1]/cur/$now.$$.$hn"; $now++; } while(-r $mf); &send_mail($_[0], $mf, $_[2], 1); } # empty_maildir(file) # Delete all messages in an maildir directory sub empty_maildir { local $d; foreach $d ("$_[0]/cur", "$_[0]/new") { local $f; opendir(DIR, $d); while($f = readdir(DIR)) { unlink("$d/$f") if ($f ne '.' && $f ne '..'); } closedir(DIR); } } # list_mhdir(file, [start], [end]) # Returns a subset of mail from an MH format directory sub list_mhdir { local ($start, $end, $f, $i, @rv); opendir(DIR, $_[0]); local @files = map { "$_[0]/$_" } sort { $a <=> $b } grep { /^\d+$/ } readdir(DIR); closedir(DIR); if (!defined($_[1])) { $start = 0; $end = @files - 1; } elsif ($_[2] < 0) { $start = @files + $_[2] - 1; $end = @files + $_[1] - 1; $start = 0 if ($start < 0); } else { $start = $_[1]; $end = $_[2]; $end = @files-1 if ($end >= @files); } foreach $f (@files) { if ($i < $start || $i > $end) { # Skip files outside requested index range push(@rv, undef); $i++; next; } local $mail = &read_mail_file($f); $mail->{'idx'} = $i++; push(@rv, $mail); } return @rv; } # search_mhdir(file|user, field, what) # Search for messages in an MH directory, and return the results sub search_mhdir { return &advanced_search_mhdir($_[0], [ [ $_[1], $_[2] ] ], 1); } # advanced_search_mhdir(file|user, &fields, andmode) # Search for messages in an MH directory, and return the results sub advanced_search_mhdir { local @rv; foreach $mail (&list_mhdir($_[0])) { push(@rv, $mail) if (&mail_matches($_[1], $_[2], $mail)); } return @rv; } # delete_mhdir(&mail, ...) # Delete messages from an MH directory sub delete_mhdir { local $m; foreach $m (@_) { unlink($m->{'file'}); } } # modify_mhdir(&oldmail, &newmail, textonly) # Replaces a message in a maildir directory sub modify_mhdir { unlink($_[0]->{'file'}); &send_mail($_[1], $_[0]->{'file'}, $_[2], 1); } # max_mhdir(dir) # Returns the maximum message ID in the directory sub max_mhdir { local $max = 1; opendir(DIR, $_[0]); foreach $f (readdir(DIR)) { $max = $f if ($f =~ /^\d+$/ && $f > $max); } closedir(DIR); return $max; } # empty_mhdir(file) # Delete all messages in an MH format directory sub empty_mhdir { local $f; opendir(DIR, $_[0]); foreach $f (readdir(DIR)) { unlink("$_[0]/$f") if ($f =~ /^\d+$/); } closedir(DIR); } # read_mail_file(file, [headersonly]) # Read a single message from a file sub read_mail_file { local (@headers, $mail); $mail->{'file'} = $_[0]; # Read the headers open(MAIL, $_[0]) || return undef; while(1) { local $line = ; $line =~ s/\r|\n//g; last if ($line eq ''); if ($line =~ /^(\S+):\s*(.*)/) { push(@headers, [ $1, $2 ]); $mail->{'rawheaders'} .= $line."\n"; } elsif ($line =~ /^(\s+.*)/) { $headers[$#headers]->[1] .= $1 unless($#headers < 0); $mail->{'rawheaders'} .= $line."\n"; } } $mail->{'headers'} = \@headers; foreach $h (@headers) { $mail->{'header'}->{lc($h->[0])} = $h->[1]; } if (!$_[1]) { # Read the mail body while(read(MAIL, $buf, 1024) > 0) { $mail->{'body'} .= $buf; } close(MAIL); } local @st = stat($_[0]); $mail->{'size'} = $st[7]; return $mail; } # dash_mode(user|file) # Returns 1 if the messages in this folder are separated by lines like # From - instead of the usual From foo@bar.com sub dash_mode { open(DASH, &user_mail_file($_[0])) || return 0; # assume no local $line = ; close(DASH); return $line =~ /^From\s+(\S+).*\d/ && $1 eq '-'; } # mail_matches(&fields, andmode, &mail) # Returns 1 if some message matches a search sub mail_matches { local $count = 0; local $f; foreach $f (@{$_[0]}) { local $field = $f->[0]; local $what = $f->[1]; local $neg = ($field =~ s/^\!//); if ($field eq 'body') { $count++ if (!$neg && $_[2]->{'body'} =~ /\Q$what\E/i || $neg && $_[2]->{'body'} !~ /\Q$what\E/i); } elsif ($field eq 'size') { $count++ if (!$neg && $_[2]->{'size'} > $what || $neg && $_[2]->{'size'} < $what); } elsif ($field eq 'headers') { local $headers = $_[2]->{'rawheaders'} || join("", map { $_->[0].": ".$_->[1]."\n" } @{$_[2]->{'headers'}}); $count++ if (!$neg && $headers =~ /\Q$what\E/i || $neg && $headers !~ /\Q$what\E/i); } else { $count++ if (!$neg && $_[2]->{'header'}->{$field} =~ /\Q$what\E/i|| $neg && $_[2]->{'header'}->{$field} !~ /\Q$what\E/i); } return 1 if ($count && !$_[1]); } return $count == @{$_[0]}; } # search_fields(&fields) # Returns an array of headers/fields from a search sub search_fields { local @rv; foreach $f (@{$_[0]}) { $f->[0] =~ /^\!?(.*)$/; push(@rv, $1); } return &unique(@rv); } # parse_delivery_status(text) # Returns the fields from a message/delivery-status attachment sub parse_delivery_status { local @lines = split(/[\r\n]+/, $_[0]); local (%rv, $l); foreach $l (@lines) { if ($l =~ /^(\S+):\s*(.*)/) { $rv{lc($1)} = $2; } } return \%rv; } 1; mailbox/mailbox-lib.pl0100664000567100000120000003714010033502575014735 0ustar jcameronwheel# mailbox-lib.pl # XXX don't connect when viewing cached mail? # XXX can we cache IMAP messages? # XXX don't reply-to our address do '../web-lib.pl'; &init_config(); &switch_to_remote_user(); &create_user_config_dirs(); do 'boxes-lib.pl'; do 'folders-lib.pl'; if ($config{'mail_qmail'}) { $qmail_maildir = &mail_file_style($remote_user, $config{'mail_qmail'}, $config{'mail_style'}); } else { $qmail_maildir = "$remote_user_info[7]/$config{'mail_dir_qmail'}"; } $address_book = "$user_module_config_directory/address_book"; $address_group_book = "$user_module_config_directory/address_group_book"; $folders_dir = "$remote_user_info[7]/$userconfig{'mailbox_dir'}"; %folder_types = map { $_, 1 } split(/,/, $config{'folder_types'}); # mailbox_file() sub mailbox_file { if ($config{'mail_system'} == 0) { return &user_mail_file(@remote_user_info); } else { return "$qmail_maildir/"; } } # decrypt_attachments(&mail) # If the attachments on a mail are encrypted, converts them into unencrypted # form. Returns a code and message, valid codes being: 0 = not encrypted, # 1 = encrypted but cannot decrypt, 2 = failed to decrypt, 3 = decrypted OK sub decrypt_attachments { # Check requirements for decryption local $first = $_[0]->{'attach'}->[0]; local ($body) = grep { $_->{'type'} eq 'text/plain' || $_->{'type'} eq 'text' } @{$_[0]->{'attach'}}; local $hasgpg = &has_command("gpg") && &foreign_check("gnupg"); if ($_[0]->{'header'}->{'content-type'} =~ /^multipart\/encrypted/ && $first->{'type'} =~ /^application\/pgp-encrypted/ && $first->{'data'} =~ /Version:\s+1/i) { # RFC 2015 PGP encryption of entire message return (1) if (!$hasgpg); &foreign_require("gnupg", "gnupg-lib.pl"); local $plain; local $enc = $_[0]->{'attach'}->[1]; local $rv = &foreign_call("gnupg", "decrypt_data", $enc->{'data'}, \$plain); return (2, $rv) if ($rv); $plain =~ s/\r//g; local $amail = &extract_mail($plain); &parse_mail($amail); $_[0]->{'attach'} = $amail->{'attach'}; return (3); } # Check individual attachments for text-only encryption local $a; local $cc = 0; foreach $a (@{$_[0]->{'attach'}}) { if ($a->{'data'} =~ /(-+BEGIN PGP MESSAGE-+\n([\000-\377]+)-+END PGP MESSAGE-+\n)/i) { local $enc = $1; return (1) if (!$hasgpg); &foreign_require("gnupg", "gnupg-lib.pl"); $cc++; local $pass = &foreign_call("gnupg", "get_passphrase"); local $plain; local $rv = &foreign_call("gnupg", "decrypt_data", $enc, \$plain, $pass); return (2, $rv) if ($rv); $a->{'data'} = $plain; } } return $cc ? ( 3 ) : ( 0 ); } # list_addresses() # Returns a list of address book entries, each an array reference containing # the email address, real name, index (if editable) and From: flag sub list_addresses { local @rv; local $i = 0; open(ADDRESS, $address_book); while(
) { s/\r|\n//g; local @sp = split(/\t+/, $_); if (@sp >= 2) { push(@rv, [ $sp[0], $sp[1], $i, $sp[2] ]); } $i++; } close(ADDRESS); if ($config{'global_address'}) { local $gab = &group_subs($config{'global_address'}); open(ADDRESS, $gab); while(
) { s/\r|\n//g; local @sp = split(/\t+/, $_); if (@sp >= 2) { push(@rv, [ $sp[0], $sp[1] ]); } } close(ADDRESS); } if ($userconfig{'sort_addrs'} == 2) { return sort { lc($a->[0]) cmp lc($b->[0]) } @rv; } elsif ($userconfig{'sort_addrs'} == 1) { return sort { lc($a->[1]) cmp lc($b->[1]) } @rv; } else { return @rv; } } # create_address(email, real name, forfrom) # Adds an entry to the address book sub create_address { open(ADDRESS, ">>$address_book"); print ADDRESS "$_[0]\t$_[1]\t$_[2]\n"; close(ADDRESS); } # modify_address(index, email, real name, forfrom) # Updates some entry in the address book sub modify_address { &replace_file_line($address_book, $_[0], "$_[1]\t$_[2]\t$_[3]\n"); } # delete_address(index) # Deletes some entry from the address book sub delete_address { &replace_file_line($address_book, $_[0]); } # address_button(field, [form], [frommode], [realfield], [nogroups]) # Returns HTML for an address-book popup button sub address_button { local $form = @_ > 1 ? $_[1] : 0; local $mode = @_ > 2 ? $_[2] : 0; local $nogroups = @_ > 4 ? $_[4] : 0; local ($rfield1, $rfield2); if ($_[3]) { return "\n"; } else { return "\n"; } } # list_folders() # Returns a list of all folders for this user # folder types: 0 = mbox, 1 = maildir, 2 = pop3, 3 = mh, 4 = imap # folder modes: 0 = ~/mail, 1 = external folder, 2 = sent mail, # 3 = inbox/drafts/trash sub list_folders { local (@rv, $f, $o, %done); if ($config{'mail_system'} == 2) { # POP3 inbox push(@rv, { 'name' => $text{'folder_inbox'}, 'type' => 2, 'server' => $config{'pop3_server'} || "localhost", 'mode' => 3, 'inbox' => 1, 'index' => 0 }); &read_file("$user_module_config_directory/inbox.pop3", $rv[$#rv]); } elsif ($config{'mail_system'} == 4) { # IMAP inbox push(@rv, { 'name' => $text{'folder_inbox'}, 'type' => 4, 'server' => $config{'pop3_server'} || "localhost", 'mode' => 3, 'inbox' => 1, 'index' => 0 }); &read_file("$user_module_config_directory/inbox.imap", $rv[$#rv]); } else { # Local mail file inbox push(@rv, { 'name' => $text{'folder_inbox'}, 'type' => $config{'mail_system'}, 'mode' => 3, 'inbox' => 1, 'file' => $config{'mail_system'} == 0 ? &user_mail_file(@remote_user_info) : $qmail_maildir, 'index' => 0 }); $done{$rv[$#rv]->{'file'}}++; } # Add sent mail file local $sf; if ($folder_types{'ext'} && $userconfig{'sent_mail'}) { $sf = $userconfig{'sent_mail'}; $done{$userconfig{'sent_mail'}}++; } else { $sf = "$folders_dir/sentmail"; } $done{"$folders_dir/sentmail"}++; push(@rv, { 'name' => $text{'folder_sent'}, 'type' => &folder_type($sf), 'file' => $sf, 'perpage' => $userconfig{'perpage_sent_mail'}, 'fromaddr' => $userconfig{'fromaddr_sent_mail'}, 'mode' => 2, 'sent' => 1, 'index' => scalar(@rv) }); # Add drafts file local $df = "$folders_dir/drafts"; $done{$df}++; push(@rv, { 'name' => $text{'folder_drafts'}, 'type' => &folder_type($df), 'file' => $df, 'mode' => 3, 'drafts' => 1, 'index' => scalar(@rv) }); # If using a trash folder, add it if ($userconfig{'delete_mode'} == 1) { local $tf = "$folders_dir/trash"; $done{$tf}++; push(@rv, { 'name' => $text{'folder_trash'}, 'type' => &folder_type($df), 'file' => $tf, 'mode' => 3, 'trash' => 1, 'index' => scalar(@rv) }); } # Add local folders, usually under ~/mail if ($folder_types{'local'}) { foreach $p (&recursive_files($folders_dir)) { local $f = $p; $f =~ s/^\Q$folders_dir\E\///; push(@rv, { 'name' => $f, 'file' => $p, 'type' => &folder_type($p), 'perpage' => $userconfig{"perpage_$f"}, 'fromaddr' => $userconfig{"fromaddr_$f"}, 'sent' => $userconfig{"sent_$f"}, 'mode' => 0, 'index' => scalar(@rv) } ) if (!$done{$p}); $done{$p}++; } } # Add user-defined external mail file folders if ($folder_types{'ext'}) { foreach $o (split(/\t+/, $userconfig{'mailboxes'})) { $o =~ /\/([^\/]+)$/ || next; push(@rv, { 'name' => $userconfig{"folder_$o"} || $1, 'file' => $o, 'perpage' => $userconfig{"perpage_$o"}, 'fromaddr' => $userconfig{"fromaddr_$o"}, 'sent' => $userconfig{"sent_$o"}, 'type' => &folder_type($o), 'mode' => 1, 'index' => scalar(@rv) } ) if (!$done{$o}); $done{$o}++; } } # Add user-defined POP3 and IMAP folders opendir(DIR, $user_module_config_directory); foreach $f (readdir(DIR)) { if ($f =~ /^(\d+)\.pop3$/ && $folder_types{'pop3'}) { local %pop3; &read_file("$user_module_config_directory/$f", \%pop3); $pop3{'type'} = 2; $pop3{'mode'} = 0; $pop3{'remote'} = 1; $pop3{'nowrite'} = 1; $pop3{'index'} = scalar(@rv); push(@rv, \%pop3); } elsif ($f =~ /^(\d+)\.imap$/ && $folder_types{'imap'}) { local %imap; &read_file("$user_module_config_directory/$f", \%imap); $imap{'type'} = 4; $imap{'mode'} = 0; $imap{'remote'} = 1; $imap{'index'} = scalar(@rv); push(@rv, \%imap); } } closedir(DIR); foreach $f (@rv) { if ($f->{'file'} && $userconfig{"notes_".$f->{'file'}}) { $f->{'notes_decode'} = 1; } } return @rv; } # recursive_files(dir) sub recursive_files { local ($f, @rv); opendir(DIR, $_[0]); local @files = readdir(DIR); closedir(DIR); foreach $f (@files) { next if ($f =~ /^\./ || $f =~ /\.lock$/i); local $p = "$_[0]/$f"; if ($userconfig{'mailbox_recur'} || !-d $p || -d "$p/cur") { push(@rv, $p); } else { push(@rv, &recursive_files($p)); } } return @rv; } # notes_decode(&mail, &folder) # Given a message forwarded by lotus notes, extra the real from and subject # lines from the body sub notes_decode { return if (!$_[1]->{'notes_decode'}); local ($from, $subject, $h); if ($_[0]->{'body'} =~ /(^|Content-type:.*)\n\s*\nFrom: +(.*)/) { $from = $2; } elsif ($_[0]->{'body'} =~ /(^|Content-type:.*)\n\s*\n(\([^\)]+\)\s*)?(\S.*)/) { $from = $3; } $from =~ s/\s+on.*//; $from =~ s/\d+\/\d+\/\d+\s+\d+:\d+\s*//; $from = undef if ($from =~ /:/); if ($_[0]->{'body'} =~ /\nSubject: +(.*)/) { $subject = $1; } local ($ofrom) = &address_parts($_[0]->{'header'}->{'from'}); if ($from && $from !~ /\@\S+\.\S+/) { $from = "\"$from\" <$ofrom>"; } foreach $h ([ 'From', $from ], [ 'Subject', $subject ]) { next if (!$h->[1]); local ($eh) = grep { lc($_->[0]) eq lc($h->[0]) } @{$_[0]->{'headers'}}; if ($eh) { $eh->[1] = $h->[1]; } else { push(@{$_[0]->{'headers'}}, $h); } $_[0]->{'header'}->{lc($h->[0])} = $h->[1]; } } # need_delete_warn(&folder) sub need_delete_warn { return 1 if ($userconfig{'delete_warn'} eq 'y'); return 0 if ($userconfig{'delete_warn'} eq 'n'); local $mf; return $_[0]->{'type'} == 0 && ($mf = &folder_file($_[0])) && &disk_usage_kb($mf)*1024 > $userconfig{'delete_warn'}; } # get_signature() # Returns the users signature, if any sub get_signature { local $sf = &get_signature_file(); $sf || return undef; local $sig; open(SIG, $sf) || return undef; while() { $sig .= $_; } close(SIG); return $sig; } # get_signature_file() # Returns the full path to the file that should contain the user's signature, # or undef if none is defined sub get_signature_file { return undef if ($userconfig{'sig_file'} eq '*'); local $sf = $userconfig{'sig_file'}; $sf = "$remote_user_info[7]/$sf" if ($sf !~ /^\//); return $sf; } # movecopy_select(number, &folders, &folder-to-exclude) # Returns HTML for selecting a folder to move or copy to sub movecopy_select { local $rv; $rv .= "\n"; $rv .= "\n"; local @mfolders = grep { $_ ne $_[2] && !$_->{'nowrite'} } @{$_[1]}; $rv .= &folder_select(\@mfolders, undef, "mfolder$_[0]"); return $rv; } # show_folder_options(&folder, mode) sub show_folder_options { print " $text{'edit_perpage'}\n"; printf " %s\n", $_[0]->{'perpage'} ? "" : "checked", $text{'default'}; printf " %s\n", $_[0]->{'perpage'} ? "checked" : ""; printf " \n", $_[0]->{'perpage'}; if ($_[1] != 2) { print " $text{'edit_sentview'}\n"; printf " %s\n", $_[0]->{'sent'} ? "checked" : "", $text{'yes'}; printf " %s \n", $_[0]->{'sent'} ? "" : "checked", $text{'no'}; } print " $text{'edit_fromaddr'}\n"; printf " %s\n", $_[0]->{'fromaddr'} ? "" : "checked", $text{'default'}; printf " %s\n", $_[0]->{'fromaddr'} ? "checked" : ""; printf " %s \n", $_[0]->{'fromaddr'}, &address_button("fromaddr", 0, 1); } # list_address_groups() # Returns a list of address book entries, each an array reference containing # the group name, members and index sub list_address_groups { local @rv; local $i = 0; open(ADDRESS, $address_group_book); while(
) { s/\r|\n//g; local @sp = split(/\t+/, $_); if (@sp == 2) { push(@rv, [ $sp[0], $sp[1], $i ]); } $i++; } close(ADDRESS); if ($config{'global_address_group'}) { local $gab = &group_subs($config{'global_address_group'}); open(ADDRESS, $gab); while(
) { s/\r|\n//g; local @sp = split(/\t+/, $_); if (@sp == 2) { push(@rv, [ $sp[0], $sp[1] ]); } } close(ADDRESS); } if ($userconfig{'sort_addrs'} == 1) { return sort { lc($a->[0]) cmp lc($b->[0]) } @rv; } elsif ($userconfig{'sort_addrs'} == 2) { return sort { lc($a->[1]) cmp lc($b->[1]) } @rv; } else { return @rv; } } # create_address_group(name, members) # Adds an entry to the address group book sub create_address_group { open(ADDRESS, ">>$address_group_book"); print ADDRESS "$_[0]\t$_[1]\n"; close(ADDRESS); } # modify_address_group(index, name, members) # Updates some entry in the address group book sub modify_address_group { &replace_file_line($address_group_book, $_[0], "$_[1]\t$_[2]\n"); } # delete_address_group(index) # Deletes some entry from the address group book sub delete_address_group { &replace_file_line($address_group_book, $_[0]); } # list_folders_sorted() # Like list_folders(), but applies the chosen sort sub list_folders_sorted { local @folders = &list_folders(); if ($userconfig{'folder_sort'} == 0) { local @builtin = grep { $_->{'mode'} >= 2 } @folders; local @local = grep { $_->{'mode'} == 0 } @folders; local @external = grep { $_->{'mode'} == 1 } @folders; return (@builtin, (sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @local), (sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @external)); } elsif ($userconfig{'folder_sort'} == 1) { local @builtin = grep { $_->{'mode'} >= 2 } @folders; local @extra = grep { $_->{'mode'} < 2 } @folders; return (@builtin, sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @extra); } elsif ($userconfig{'folder_sort'} == 2) { return sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @folders; } } # find_named_folder(name, &folders) # Finds a folder by filename, server name or displayed name sub find_named_folder { local ($rv) = grep { $_->{'file'} eq $_[0] || $_->{'server'} eq $_[0] } @{$_[1]}; ($rv) = grep { $_->{'name'} eq $_[0] } @{$_[1]} if (!$rv); return $rv; } # group_subs(filename) # Replaces $group in a filename with the first valid primary or secondary # that matches a file sub group_subs { local @ginfo = getgrgid($remote_user_info[3]); local $rv = $_[0]; $rv =~ s/\$group/$ginfo[0]/g; if ($rv =~ /\$sgroup/) { # Try all secondary groups, and stop at the first one setgrent(); while(@ginfo = getgrent()) { local @m = split(/\s+/, $ginfo[3]); if (&indexof($remote_user, @m) >= 0) { local $rv2 = $rv; $rv2 =~ s/\$sgroup/$ginfo[0]/g; if (-r $rv2) { $rv = $rv2; last; } } } endgrent() if ($gconfig{'os_type'} ne 'hpux'); } return $rv; } 1; mailbox/index.cgi0100755000567100000120000002500310033256544013772 0ustar jcameronwheel#!/usr/local/bin/perl # index.cgi # List the mail messages for the user require './mailbox-lib.pl'; &ReadParse(); dbmopen(%read, "$user_module_config_directory/read", 0600); print "Refresh: $userconfig{'refresh'}\r\n" if ($userconfig{'refresh'}); &header($text{'mail_title'}, "", undef, 1, 1); print &check_clicks_function(); print "
\n"; @folders = &list_folders_sorted(); if (!defined($in{'folder'}) && $userconfig{'default_folder'}) { $df = &find_named_folder($userconfig{'default_folder'}, \@folders); $in{'folder'} = $df->{'index'} if ($df); } ($folder) = grep { $_->{'index'} == $in{'folder'} } @folders; # Check if this is a POP3 or IMAP inbox with no login set if (($folder->{'type'} == 2 || $folder->{'type'} == 4) && $folder->{'mode'} == 3 && !defined($folder->{'user'})) { print "
\n"; print "\n"; print "
\n"; print "\n"; print "
$text{'mail_loginheader'}
",&text('mail_logindesc', "$folder->{'server'}"),"\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; if ($folder->{'type'} == 4) { print "\n"; } print "\n"; print "
$text{'mail_loginuser'}
$text{'mail_loginpass'}
$text{'mail_loginmailbox'}", " \n"; printf" %s
\n", "checked", $text{'edit_imapinbox'}; printf" %s\n", $text{'edit_imapother'}; print "
\n"; print "\n"; print "
\n"; print "
\n"; &footer("/", $text{'index'}); exit; } # Get folder-selection HTML $sel = &folder_select(\@folders, $folder, "folder"); # Work out start from jump page $perpage = $folder->{'perpage'} || $userconfig{'perpage'} || 20; if ($in{'jump'} =~ /^\d+$/ && $in{'jump'} > 0) { $in{'start'} = ($in{'jump'}-1)*$perpage; } # View mail from the most recent @mail = reverse(&mailbox_list_mails(-$in{'start'}, -$in{'start'}-$perpage+1, $folder, 1, \@error)); if ($in{'start'} >= @mail && $in{'jump'}) { # Jumped too far! $in{'start'} = @mail - $perpage; @mail = reverse(&mailbox_list_mails(-$in{'start'}, -$in{'start'}-$perpage+1, $folder, 1, \@error)); } # Show page flipping arrows &show_arrows(); print "
\n"; print "\n"; if ($userconfig{'top_buttons'} && @mail) { &show_buttons(1); print "$text{'mail_all'} \n"; print "$text{'mail_invert'} \n"; } $showto = $folder->{'sent'} || $folder->{'drafts'}; if (@mail) { print "\n"; print " ", $showto ? "" : " ", $userconfig{'show_to'} ? $showto ? "" : "" : "", " ", " ", "\n"; } if (@error) { print "
\n"; print &text('mail_err', $error[0] == 0 ? $error[1] : &text('save_elogin', $error[1])),"\n"; print "
\n"; } elsif (@error && $error[0] == 2) { } for($i=$in{'start'}; $i<@mail && $i<$in{'start'}+$perpage; $i++) { ¬es_decode($mail[$i], $folder); local $idx = $mail[$i]->{'idx'}; print "\n"; print "\n"; print "\n"; if ($userconfig{'show_to'}) { print "\n"; } print "\n"; print "\n"; print "\n"; } if (@mail) { print "
 $text{'mail_to'}$text{'mail_from'}$text{'mail_from'}$text{'mail_to'}$text{'mail_date'}$text{'mail_size'}$text{'mail_subject'}
", &simplify_from($mail[$i]->{'header'}->{$showto ? 'to' : 'from'}), "",&simplify_from( $mail[$i]->{'header'}->{$showto ? 'from' : 'to'}), "",&simplify_date($mail[$i]->{'header'}->{'date'}), "",int($mail[$i]->{'size'}/1000)+1," kB","", "
",&simplify_subject($mail[$i]->{'header'}->{'subject'}), " "; if ($mail[$i]->{'header'}->{'content-type'} =~ /multipart\/\S+/i) { print ""; } local $p = int($mail[$i]->{'header'}->{'x-priority'}); if ($p == 1) { print " "; } elsif ($p == 2) { print " "; } if (!$showto) { if ($read{$mail[$i]->{'header'}->{'message-id'}} == 2) { print " "; } elsif ($read{$mail[$i]->{'header'}->{'message-id'}} == 1) { print " "; } } print "
\n"; print "$text{'mail_all'} \n"; print "$text{'mail_invert'} \n"; } &show_buttons(2); if ($userconfig{'arrows'}) { # Show page flipping arrows print "
\n"; &show_arrows(); } print "
\n"; # Show search form print "
\n"; print "\n"; print "\n"; $jumpform = (@mail > $perpage); print "\n"; print "\n"; print "\n"; print "\n"; # Show page jump form if ($jumpform) { print "\n"; print "\n"; print "\n"; } else { print "\n"; } print "\n"; # Show various buttons for the address book, folders, sig and logging out $logout = ($folder->{'type'} == 2 || $folder->{'type'} == 4) && $folder->{'mode'} == 3 && defined($folder->{'user'}); print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; if (&get_signature_file()) { print "\n"; print "\n"; print "\n"; } else { print "\n"; } print "\n"; print "\n"; if ($folder->{'trash'} || $userconfig{'show_delall'}) { # Show button to delete all mail in folder print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } else { print "\n"; } print "\n"; if ($logout) { # Add button for logging out of inbox print "\n"; print "\n"; print "\n"; print "\n"; } print "\n"; print "
\n"; print "\n"; print "\n"; print "\n"; print "
\n"; print "\n"; printf " %s %s\n", int($in{'start'} / $perpage)+1, $text{'mail_of'}, int(@mail / $perpage)+1; print "
", "
\n"; print "
\n"; &footer("/", $text{'index'}); &pop3_logout(); # show_buttons(number) sub show_buttons { print "\n"; if (@mail) { print "\n"; print "\n"; if (@folders > 1) { print "\n"; } print "\n"; } print "\n"; print "
\n"; print "\n"; print "\n"; print "\n"; print "",&movecopy_select($_[0], \@folders, $folder),"
\n"; } sub show_arrows { print "
\n"; print "
\n"; if ($in{'start'}+$perpage < @mail) { printf "%s\n", $in{'start'}+$perpage, $in{'folder'}, ''; } local $s = @mail-$in{'start'}; local $e = @mail-$in{'start'}-$perpage+1; if (@mail) { print &text('mail_pos', $s, $e < 1 ? 1 : $e, scalar(@mail), $sel); } else { print &text('mail_none', $sel); } print "\n"; if ($in{'start'}) { printf "%s\n", $in{'start'}-$perpage, $in{'folder'}, ''; } print "
\n"; } mailbox/config-aix0100664000567100000120000000047110035762242014146 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/spool/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/sbin/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config.info0100664000567100000120000000320510035762463014324 0ustar jcameronwheelline1=Inbox format and location,11 mail_system=Mail storage format for Inbox,4,0-Sendmail style single file (mbox),1-Qmail style directory (Maildir),3-MH style directory (MH),2-Remote POP3 server,4-Remote IMAP server mail_dir=Sendmail mail file location,3,File under home directory mail_file=Sendmail mail file in home directory,0 mail_qmail=Qmail or MH directory location,3,Subdirectory under home directory mail_dir_qmail=Qmail or MH directory in home directory,0 mail_style=Mail subdirectory style,4,0-mail/username,1-mail/u/username,2-mail/u/us/username,3-mail/u/s/username pop3_server=POP3 or IMAP server name,3,localhost line2=Sending email,11 send_mode=Send mail via connection to,3,Sendmail executable no_crlf=Add carriage return ( \r ) to each line?,1,0-Yes,1-No sendmail_path=Sendmail command,0 line3=User From addresses,11 server_name=Default hostname for From: addresses,10,-From real hostname,*-From URL edit_from=Allow editing of From: address,1,1-Yes,0-No (always username@hostname),2-Only the username part from_map=From: address mapping file,3,None line4=Other settings and restrictions,11 server_attach=Allow access to server-side files?,1,2-Attach and detach,1-Attach only,0-Niether max_attach=Maximum total attachments size,3,Unlimited index_min=Minimum mail file size to index,3,Always index index_dbm=Use DBM files for indexes?,1,2-Always,1-Only for new indexes,0-Never global_address=Global address book file,3,None global_address_group=Global address group book file,3,None folder_types=Allowed folder types,2,local-File under ~/mail,ext-External file,pop3-POP3 server,imap-IMAP server pop_locks=Check for POP3 lock files?,1,1-Yes,0-No mailbox/save_group.cgi0100775000567100000120000000106207754064736015056 0ustar jcameronwheel#!/usr/local/bin/perl # save_group.cgi # Save, add or delete an address group entry require './mailbox-lib.pl'; &ReadParse(); if ($in{'gdelete'} ne '') { &delete_address_group($in{'gdelete'}); } else { &error_setup($text{'group_err'}); $in{'group'} =~ /\S/ || &error($text{'group_egroup'}); $in{'members'} =~ /\S/ || &error($text{'group_emembers'}); if ($in{'gadd'}) { &create_address_group($in{'group'}, $in{'members'}); } else { &modify_address_group($in{'gedit'}, $in{'group'}, $in{'members'}); } } &redirect("list_addresses.cgi#groups"); mailbox/config.info.de0100755000567100000120000000361210006026344014703 0ustar jcameronwheeledit_from=Erlaube das Editieren der From:-Addresse,1,1-Ja,0-Nein (Immer benutzername@hostname setzen),2-Nur den Benutzernamenanteil vor dem @ folder_types=Erlaubte Verzeichnisarten,2,local-Datei unterhalb ~/mail,ext-Externe Datei,pop3-POP3-Server,imap-IMAP-Server from_map=From:-Adressen-Mappendatei,3,Keine global_address=Datei für das Globale Adressbuch,3,Keines index_dbm=Benutze DBM-Dateien für die Indexe?,1,2-Immer,1-Nur für neue Indexe,0-Niemals index_min=Minimale eMail-Dateigröße zum Indizieren,3,Immer indizieren line1=Posteingangsformat und -Ort,11 line2=eMail versenden,11 line3=Benutzerdefinierte From:-Adressen,11 line4=Andere Einstellungen und Restriktionen,11 mail_dir_qmail=Qmail- oder MH-Verzeichnis im Home-Verzeichnis,0 mail_dir=Speicherort für die Sendmail-Einzeldatei,3,Datei im Home-Verzeichnis mail_file=Dateiname der Sendmail-Einzeldatei im Home-Verzeichnis,0 mail_qmail=Qmail- oder MH-Verzeichnisort,3,Unterverzeichnis im Home-Verzeichnis mail_style=Mail-Unterverzeichnisart,4,0-mail/benutzername,1-mail/b/benutzername,2-mail/b/be/benutzername,3-mail/b/e/benutzername mail_system=eMail-Speicherart für Posteingang,4,0-Sendmail-Einzeldatei (mbox),1-Qmail-Verzeichnis (Maildir),3-MH-Verzeichnis (MH),2-Entfernter POP3-Server,4-Entfernter IMAP-Server max_attach=Maximale Größe aller Anhänge pro eMail,3,Unbegrenzt pop3_server=POP3- oder IMAP-Servername,3,localhost sendmail_path=Sendmail-Befehl,0 send_mode=Versand von eMail über eine Verbindung zu ,3,Sendmail-Binary server_attach=Erlaube Zugriff auf Serverdateien?,1,2-Anhängen und Abhängen,1-Nur Anhängen,0-Weder noch server_name=Standard-Hostname für From:-Addressen,10,-Benutze realen Hostnamen,*-Folgende URL mailbox/view_mail.cgi0100755000567100000120000003202010033412356014627 0ustar jcameronwheel#!/usr/local/bin/perl # view_mail.cgi # View a single email message require './mailbox-lib.pl'; $force_charset = ''; &ReadParse(); foreach $a (&list_addresses()) { $inbook{$a->[0]}++; } @folders = &list_folders(); $folder = $folders[$in{'folder'}]; @mail = &mailbox_list_mails($in{'idx'}, $in{'idx'}, $folder); $mail = $mail[$in{'idx'}]; ¬es_decode($mail, $folder); &parse_mail($mail, undef, $in{'raw'}); @sub = split(/\0/, $in{'sub'}); $subs = join("", map { "&sub=$_" } @sub); foreach $s (@sub) { # We are looking at a mail within a mail .. &decrypt_attachments($mail); local $amail = &extract_mail($mail->{'attach'}->[$s]->{'data'}); &parse_mail($amail, undef, $in{'raw'}); $mail = $amail; } dbmopen(%read, "$user_module_config_directory/read", 0600); if ($userconfig{'auto_mark'}) { eval { $read{$mail->{'header'}->{'message-id'}} = 1 } if (!$read{$mail->{'header'}->{'message-id'}}); } if ($in{'raw'}) { # Special mode - viewing whole raw message print "Content-type: text/plain\n\n"; if ($mail->{'fromline'}) { print $mail->{'fromline'},"\n"; } if (defined($mail->{'rawheaders'})) { #$mail->{'rawheaders'} =~ s/(\S)\t/$1\n\t/g; print $mail->{'rawheaders'}; } else { foreach $h (@{$mail->{'headers'}}) { #$h->[1] =~ s/(\S)\t/$1\n\t/g; print "$h->[0]: $h->[1]\n"; } } print "\n"; print $mail->{'body'}; exit; } $module_index_link = "/$module_name/index.cgi?folder=$in{'folder'}"; &header($text{'view_title'}, ""); print "
\n"; print &check_clicks_function(); &show_arrows(); print "
\n"; print "
\n"; print "\n"; print "\n"; foreach $s (@sub) { print "\n"; } # Check for encryption ($deccode, $decmessage) = &decrypt_attachments($mail); @attach = @{$mail->{'attach'}}; # Find body attachment and type ($textbody, $htmlbody, $body) = &find_body($mail, $userconfig{'view_html'}); $body = $htmlbody if ($in{'body'} == 2); $body = $textbody if ($in{'body'} == 1); # Find any delivery status attachment ($dstatus) = grep { $_->{'type'} eq 'message/delivery-status' } @attach; # XXX look for text/calendar body # Check for signing if (&has_command("gpg") && &foreign_check("gnupg")) { # Check for GnuPG signatures local $sig; foreach $a (@attach) { $sig = $a if ($a->{'type'} =~ /^application\/pgp-signature/); } if ($sig) { # Verify the signature against the rest of the attachment &foreign_require("gnupg", "gnupg-lib.pl"); local $rest = $sig->{'parent'}->{'attach'}->[0]; $rest->{'raw'} =~ s/\r//g; $rest->{'raw'} =~ s/\n/\r\n/g; ($sigcode, $sigmessage) = &foreign_call("gnupg", "verify_data", $rest->{'raw'}, $sig->{'data'}); @attach = grep { $_ ne $sig } @attach; } elsif ($body && $body eq $textbody && $body->{'data'} =~ /(-+BEGIN PGP SIGNED MESSAGE-+\n(Hash:\s+(\S+)\n\n)?([\000-\377]+\n)-+BEGIN PGP SIGNATURE-+\n([\000-\377]+)-+END PGP SIGNATURE-+\n)/i) { # Signature is in body text! local $sig = $1; local $text = $4; &foreign_require("gnupg", "gnupg-lib.pl"); ($sigcode, $sigmessage) = &foreign_call("gnupg", "verify_data", $sig); if ($sigcode == 0 || $sigcode == 1) { # XXX what about replying? $body->{'data'} = $text; } } } # Strip out attachments not to display as icons @attach = grep { $_ ne $body && $_ ne $dstatus } @attach; @attach = grep { !$_->{'attach'} } @attach; if ($userconfig{'top_buttons'} == 2) { &show_buttons(1, scalar(@sub)); print "

\n"; } print "\n"; print "\n"; print "
", "\n"; print "
$text{'view_headers'} \n"; if ($in{'headers'}) { print "$text{'view_noheaders'}\n"; } else { print "$text{'view_allheaders'}\n"; } print "  $text{'view_raw'}
\n"; if ($in{'headers'}) { # Show all the headers if ($mail->{'fromline'}) { print "", "\n"; } foreach $h (@{$mail->{'headers'}}) { print " ", "\n"; } } else { # Just show the most useful headers print " ", "\n"; print " ", "\n"; print " ", "\n" if ($mail->{'header'}->{'cc'}); print " ", "\n"; print " ", "\n"; } print "
$text{'mail_rfc'}",&html_escape(&eucconv($mail->{'fromline'})), "
$h->[0]:",&html_escape(&eucconv(&decode_mimewords($h->[1]))), "
$text{'mail_from'}",&address_link($mail->{'header'}->{'from'}),"
$text{'mail_to'}",&address_link($mail->{'header'}->{'to'}),"
$text{'mail_cc'}",&address_link($mail->{'header'}->{'cc'}),"
$text{'mail_date'}",&html_escape(&eucconv($mail->{'header'}->{'date'})), "
$text{'mail_subject'}",&html_escape(&eucconv(&decode_mimewords( $mail->{'header'}->{'subject'}))),"

\n"; # Show body attachment, with properly linked URLs if ($body && $body->{'data'} =~ /\S/) { if ($body eq $textbody) { # Show plain text $bodycontents = "

";
		foreach $l (&wrap_lines(&eucconv($body->{'data'}),
					$userconfig{'wrap_width'})) {
			$bodycontents .= &link_urls_and_escape($l)."\n";
			}
		$bodycontents .= "
"; if ($htmlbody) { $bodyright = "$text{'view_ashtml'}"; } } elsif ($body eq $htmlbody) { # Attempt to show HTML $bodycontents = &safe_html($body->{'data'}); if ($textbody) { $bodyright = "$text{'view_astext'}"; } } } if ($bodycontents) { print "\n"; print "\n"; print "
", " ", "
$text{'view_body'}$bodyright
\n"; print $bodycontents; print "

\n"; } # Show delivery status if ($dstatus) { print "\n"; print "\n"; print "
$text{'view_dstatus'}
\n"; local $ds = &parse_delivery_status($dstatus->{'data'}); foreach $dsh ('final-recipient', 'diagnostic-code', 'remote-mta', 'reporting-mta') { if ($ds->{$dsh}) { $ds->{$dsh} =~ s/^\S+;//; print "\n"; print "\n"; } } print "
", $text{'view_'.$dsh},"",&html_escape($ds->{$dsh}),"

\n"; } # Display other attachments if (@attach) { print "\n"; print "\n"; print "
$text{'view_attach'}
\n"; foreach $a (@attach) { local $fn; $size = (int(length($a->{'data'})/1000)+1)." Kb"; local $cb; if ($a->{'type'} eq 'message/rfc822') { push(@titles, "$text{'view_sub'}
$size"); } elsif ($a->{'filename'}) { push(@titles, &decode_mimewords($a->{'filename'}). "
$size"); $fn = &decode_mimewords($a->{'filename'}); push(@detach, [ $a->{'idx'}, $fn ]); } else { push(@titles, "$a->{'type'}
$size"); $a->{'type'} =~ /\/(\S+)$/; $fn = "file.$1"; push(@detach, [ $a->{'idx'}, $fn ]); } if ($a->{'error'}) { $titles[$#titles] .= "
($a->{'error'})"; } $fn =~ s/ /_/g; $fn =~ s/\#/_/g; $fn = &html_escape($fn); if ($a->{'type'} eq 'message/rfc822') { push(@links, "view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}$subs&sub=$a->{'idx'}"); } else { push(@links, "detach.cgi/$fn?idx=$in{'idx'}&folder=$in{'folder'}&attach=$a->{'idx'}$subs"); } if ($userconfig{'thumbnails'} && ($a->{'type'} =~ /image\/gif/i && &has_command("giftopnm")&& &has_command("pnmscale") && &has_command("cjpeg") || $a->{'type'} =~ /image\/jpeg/i && &has_command("djpeg") && &has_command("pnmscale") && &has_command("cjpeg"))) { # Can show an image icon push(@icons, "detach.cgi?scale=1&idx=$in{'idx'}&folder=$in{'folder'}&attach=$a->{'idx'}$subs"); $imgicons++; } else { push(@icons, "images/boxes.gif"); } } &icons_table(\@links, \@titles, \@icons, 8, undef, $imgicons ? ( 0, 0 ) : ( )); if ($config{'server_attach'} == 2 && @detach) { print "\n"; print "\n" if ($body); print "\n"; print "$text{'view_dir'}\n"; print " ", &file_chooser_button("dir", 1),"\n"; } print "

\n"; } # Display GnuPG results if (defined($sigcode)) { print "\n"; print "\n"; print "
$text{'view_gnupg'}
"; $sigmessage = &html_escape($sigmessage); $sigmessage = $sigmessage if ($sigcode == 4); print &text('view_gnupg_'.$sigcode, $sigmessage),"\n"; if ($sigcode == 3) { local $url = "/$module_name/view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}$subs"; print "

",&text('view_recv', $sigmessage, "/gnupg/recv.cgi?id=$sigmessage&return=".&urlize($url)."&returnmsg=".&urlize($text{'view_return'})),"\n"; } print "

\n"; } if ($deccode) { print "\n"; print "\n"; print "
$text{'view_crypt'}
"; print &text('view_crypt_'.$deccode, "
$decmessage
"); print "

\n"; } &show_buttons(2, scalar(@sub)); if ($userconfig{'arrows'} == 2 && !@sub) { print "
\n"; &show_arrows(); } print "

\n"; dbmclose(%read); print "
\n"; local @sr = !@sub ? ( ) : ( "view_mail.cgi?idx=$in{'idx'}", $text{'view_return'} ), $s = int((@mail - $in{'idx'} - 1) / $userconfig{'perpage'}) * $userconfig{'perpage'}; &footer(@sub ? ( "view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}", $text{'view_return'} ) : ( ), "index.cgi?folder=$in{'folder'}", $text{'mail_return'}); &pop3_logout_all(); # show_buttons(pos, submode) sub show_buttons { if ($folder->{'sent'} || $folder->{'drafts'}) { if (!$_[1]) { print "\n"; } } else { print "\n"; print "\n"; } print "\n"; if (!$_[1]) { if (!$folder->{'sent'} && !$folder->{'drafts'}) { $m = $read{$mail->{'header'}->{'message-id'}}; print "   \n"; print "\n"; print "\n"; } print "   \n"; print "\n"; } print "   \n"; print "\n"; if (!$_[1]) { @modules = &get_available_module_infos(1); ($hasspam) = grep { $_->{'dir'} eq "spam" } @modules; if (&foreign_installed("spam") && $hasspam) { print "   \n"; print "\n"; print "\n"; } } } # address_link(address) sub address_link { local @addrs = &split_addresses(&decode_mimewords($_[0])); local @rv; foreach $a (@addrs) { if ($inbook{$a->[0]}) { push(@rv, &html_escape(&eucconv($a->[2]))); } else { push(@rv, "". &html_escape(&eucconv($a->[2])).""); } } return join(" , ", @rv); } sub show_arrows { print "
\n"; if (!@sub) { if ($in{'idx'}) { print "", "\n"; } print "",&text('view_desc', $in{'idx'}+1, $folder->{'name'}),"\n"; if ($in{'idx'} < @mail-1) { print "", "\n"; } } else { print "$text{'view_sub'}\n"; } print "
\n"; } mailbox/reply_mail.cgi0100755000567100000120000004555310024000063015013 0ustar jcameronwheel#!/usr/local/bin/perl # Display a form for replying to or composing an email require './mailbox-lib.pl'; &ReadParse(); $module_index_link = "/$module_name/index.cgi?folder=$in{'folder'}"; @folders = &list_folders(); $folder = $folders[$in{'folder'}]; if ($in{'new'}) { # Composing a new email &header($text{'compose_title'}, ""); $sig = &get_signature(); $quote = "\n\n$sig" if ($sig); } else { # Replying or forwarding if ($in{'mailforward'} ne '') { # Replying to multiple @mailforward = split(/\0/, $in{'mailforward'}); @mails = &mailbox_list_mails( $mailforward[0], $mailforward[@mailforward-1], $folder); $mail = $mails[$mailforward[0]]; } else { # Replying to one @mails = &mailbox_list_mails($in{'idx'}, $in{'idx'}, $folder); $mail = $mails[$in{'idx'}]; &decode_and_sub(); } $mail || &error($text{'mail_eexists'}); if ($in{'delete'}) { # Just delete the email if (!$in{'confirm'} && &need_delete_warn($folder)) { # Need to ask for confirmation before deleting &header($text{'confirm_title'}, ""); print &check_clicks_function(); print "
\n"; print "
\n"; foreach $i (keys %in) { foreach $v (split(/\0/, $in{$i})) { print "\n"; } } print "
$text{'confirm_warn3'}
\n"; if ($userconfig{'delete_warn'} ne 'y') { print "$text{'confirm_warn2'}

\n" } else { print "$text{'confirm_warn4'}

\n" } print "

\n"; print "
\n"; &footer("view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}", $text{'view_return'}, "index.cgi?folder=$in{'folder'}", $text{'index'}); exit; } &lock_folder($folder); &mailbox_delete_mail($folder, $mail); &unlock_folder($folder); &pop3_logout_all(); &redirect("index.cgi?folder=$in{'folder'}"); exit; } elsif ($in{'print'}) { # Extract the mail body &decode_and_sub(); ($textbody, $htmlbody, $body) = &find_body($mail, $userconfig{'view_html'}); # Output HTML header &PrintHeader(); print "\n"; print "",&html_escape(&decode_mimewords( $mail->{'header'}->{'subject'})),"\n"; print "\n"; # Display the headers print "\n"; print "\n"; print "
$text{'view_headers'}
\n"; print " ", "\n"; print " ", "\n"; print " ", "\n" if ($mail->{'header'}->{'cc'}); print " ", "\n"; print " ", "\n"; print "
$text{'mail_from'}",&eucconv(&html_escape($mail->{'header'}->{'from'})),"
$text{'mail_to'}",&eucconv(&html_escape($mail->{'header'}->{'to'})),"
$text{'mail_cc'}",&eucconv(&html_escape($mail->{'header'}->{'cc'})),"
$text{'mail_date'}",&eucconv(&html_escape(&html_escape($mail->{'header'}->{'date'}))), "
$text{'mail_subject'}",&eucconv(&html_escape(&decode_mimewords( $mail->{'header'}->{'subject'}))),"

\n"; # Just display the mail body for printing if ($body eq $textbody) { print "
";
			foreach $l (&wrap_lines($body->{'data'},
						$userconfig{'wrap_width'})) {
				print &eucconv(&html_escape($l)),"\n";
				}
			print "
\n"; } elsif ($body eq $htmlbody) { print "
\n"; print &safe_html($body->{'data'}); print "
\n"; } print "\n"; exit; } elsif ($in{'mark1'} || $in{'mark2'}) { # Just mark the message dbmopen(%read, "$user_module_config_directory/read", 0600); $mode = $in{'mark1'} ? $in{'mode1'} : $in{'mode2'}; if ($mode) { $read{$mail->{'header'}->{'message-id'}} = $mode; } else { delete($read{$mail->{'header'}->{'message-id'}}); } $perpage = $folder->{'perpage'} || $userconfig{'perpage'}; $s = int((@mails - $in{'idx'} - 1) / $perpage) * $perpage; &redirect("index.cgi?start=$s&folder=$in{'folder'}"); exit; } elsif ($in{'detach'} && $config{'server_attach'} == 2) { # Detach some attachment to a directory on the server &error_setup($text{'detach_err'}); $in{'dir'} || &error($text{'detach_edir'}); $in{'dir'} = "$remote_user_info[7]/$in{'dir'}" if ($in{'dir'} !~ /^\//); &decode_and_sub(); if ($in{'attach'} eq '*') { # Detaching all attachments, under their filenames @dattach = grep { $_->{'idx'} ne $in{'bindex'} } @{$mail->{'attach'}}; } else { # Just one attachment @dattach = ( $mail->{'attach'}->[$in{'attach'}] ); } local @paths; foreach $attach (@dattach) { local $path; if (-d $in{'dir'}) { # Just write to the filename in the directory local $fn; if ($attach->{'filename'}) { $fn = &decode_mimewords( $attach->{'filename'}); } else { $attach->{'type'} =~ /\/(\S+)$/; $fn = "file.$1"; } $path = "$in{'dir'}/$fn"; } else { # Assume a full path was given $path = $in{'dir'}; } push(@paths, $path); } for($i=0; $i<@dattach; $i++) { # Try to write the files open(FILE, ">$paths[$i]") || &error(&text('detach_eopen', "$paths[$i]", $!)); (print FILE $dattach[$i]->{'data'}) || &error(&text('detach_ewrite', "$paths[$i]", $!)); close(FILE) || &error(&text('detach_ewrite', "$paths[$i]", $!)); } # Show a message about the new files &header($text{'detach_title'}, ""); print "


\n"; for($i=0; $i<@dattach; $i++) { local $sz = (int(length($dattach[$i]->{'data'}) / 1000)+1)." Kb"; print "

",&text('detach_ok', "$paths[$i]", $sz),"

\n"; } print "


\n"; &footer("view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}", $text{'view_return'}, "index.cgi?folder=$in{'folder'}", $text{'mail_return'}); exit; } elsif ($in{'black'}) { # Add sender to SpamAssassin blacklist, and tell user &header($text{'black_title'}, ""); print "
\n"; &foreign_require("spam", "spam-lib.pl"); local $conf = &spam::get_config(); local @from = map { @{$_->{'words'}} } &spam::find("blacklist_from", $conf); local %already = map { $_, 1 } @from; local ($spamfrom) = &address_parts($mail->{'header'}->{'from'}); if ($already{$spamfrom}) { print "",&text('black_already', "$spamfrom"),"

\n"; } else { push(@from, $spamfrom); &spam::save_directives($conf, 'blacklist_from', \@from, 1); &flush_file_lines(); print "",&text('black_done', "$spamfrom"),"

\n"; } print "


\n"; &footer("view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}", $text{'view_return'}, "index.cgi?folder=$in{'folder'}", $text{'mail_return'}); exit; } elsif ($in{'razor'}) { # Report message to Razor and tell user &header($text{'razor_title'}, ""); print "
\n"; print "

$text{'razor_report'}\n"; print "

";
		local %sconfig = &foreign_config("spam");
		local $temp = &tempname();
		&send_mail($mail, $temp, 0, 1);
		open(OUT, "$sconfig{'spamassassin'} --report <$temp 2>&1 |");
		local $error;
		while() {
			print &html_escape($_);
			$error++ if (/failed/i);
			}
		close(OUT);
		unlink($temp);
		print "
\n"; if ($? || $error) { print "$text{'razor_err'}

\n"; } else { print "$text{'razor_done'}

\n"; } print "


\n"; &footer("view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}", $text{'view_return'}, "index.cgi?folder=$in{'folder'}", $text{'mail_return'}); exit; } if (!@mailforward) { &parse_mail($mail); &decrypt_attachments($mail); @attach = @{$mail->{'attach'}}; } &header($in{'forward'} || @mailforward ? $text{'forward_title'} : $in{'enew'} ? $text{'enew_title'} : $text{'reply_title'}, ""); if ($in{'enew'}) { # Editing an existing message, so keep same fields $to = $mail->{'header'}->{'to'}; $rto = $mail->{'header'}->{'reply-to'}; $from = $mail->{'header'}->{'from'}; $cc = $mail->{'header'}->{'cc'}; $ouser = $1 if ($from =~ /^(\S+)\@/); } else { if (!$in{'forward'} && !@mailforward) { # Replying to a message, so set To: field $to = $mail->{'header'}->{'reply-to'}; $to = $mail->{'header'}->{'from'} if (!$to); } if ($in{'rall'}) { # If replying to all, add any addresses in the original # To: or Cc: to our new Cc: address. # XXX should strip own addresses $cc = $mail->{'header'}->{'to'}; $cc .= ", ".$mail->{'header'}->{'cc'} if ($mail->{'header'}->{'cc'}); } } # Work out new subject, depending on whether we are replying # our forwarding a message (or neither) local $qu = !$in{'enew'} && (!$in{'forward'} || !$userconfig{'fwd_mode'}); $subject = &html_escape(&decode_mimewords( $mail->{'header'}->{'subject'})); $subject = "Re: ".$subject if ($subject !~ /^Re/i && !$in{'forward'} && !@mailforward && !$in{'enew'}); $subject = "Fwd: ".$subject if ($subject !~ /^Fwd/i && ($in{'forward'} || @mailforward)); # Construct the initial mail text local ($plainbody, $htmlbody) = find_body($mail, $userconfig{'view_html'}); if ($plainbody) { $body = $plainbody; $quote = $plainbody->{'data'}; } elsif ($htmlbody) { $body = $htmlbody; $quote = &html_to_text($htmlbody->{'data'}); } if ($quote && $qu) { $quote = join("", map { "> $_\n" } &wrap_lines($quote, 70)); } $quote = &decode_mimewords($mail->{'header'}->{'from'}). " wrote ..\n".$quote if ($quote && $qu); $sig = &get_signature(); $quote .= "\n$sig" if ($sig); if ($in{'forward'} || $in{'enew'}) { @attach = grep { $_ ne $body } @attach; } else { undef(@attach); } } print "
\n"; print "
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; foreach $s (@sub) { print "\n"; } print "\n"; print "\n"; print "
$text{'reply_headers'}
\n"; print "\n"; if ($from) { # Got From address @froms = ( $from ); } else { # Work out From: address local $http_host = $ENV{'HTTP_HOST'}; $http_host =~ s/:\d+$//; if (&check_ipaddress($http_host)) { # Try to reverse-lookup IP local $rev = gethostbyaddr(inet_aton($acptip), AF_INET); $http_host = $rev if ($rev); } $http_host =~ s/^(www|ftp|mail)\.//; $hostname = $config{'server_name'} eq '*' ? $http_host : $config{'server_name'} eq '' ? &get_system_hostname() : $config{'server_name'}; @doms = split(/\s+/, $hostname); local $ru = $remote_user; $ru =~ s/\.\Q$http_host\E$//; if ($http_host =~ /^([^\.]+)/) { $ru =~ s/\.\Q$1\E//; } @froms = map { $ru.'@'.$_ } @doms; if ($config{'from_map'}) { open(MAP, $config{'from_map'}); while() { s/\r|\n//g; s/#.*$//; if (/^\s*(\S+)\s+(\S+)/ && ($1 eq $remote_user || &indexof($1, @froms) >= 0)) { push(@mfroms, $2); } } close(MAP); } @froms = @mfroms if (@mfroms > 0); $remote_user_info[6] =~ s/,.*$//; foreach $f (@froms) { $f = "\"$remote_user_info[6]\" <$f>" if ($remote_user_info[6] && $userconfig{'real_name'}); } } @faddrs = grep { $_->[3] } &list_addresses(); ($defaddr) = grep { $_->[3] == 2 } @faddrs; if ($folder->{'fromaddr'}) { ($defaddr) = &split_addresses($folder->{'fromaddr'}); } if ($config{'edit_from'} == 1) { # User can enter any from address he wants if ($defaddr) { # Address book contains a default from address $froms[0] = $defaddr->[1] ? "\"$defaddr->[1]\" <$defaddr->[0]>" : $defaddr->[0]; } print "\n"; } elsif ($config{'edit_from'} == 2) { # Only the real name and username part is editable local ($real, $user, $dom); local ($sp) = $defaddr || &split_addresses($froms[0]); $real = $sp->[1]; if ($sp->[0] =~ /^(\S+)\@(\S+)$/) { $user = $1; $dom = $2; } else { $user = $sp->[0]; } print "\n"; } else { # A fixed From address, or a choice of fixed options if (@froms > 1) { print "\n"; } else { print "\n"; print "\n"; } } $to = &html_escape($to); if ($userconfig{'reply_to'} ne 'x') { # Show Reply-To: and To: fields $rto = &html_escape($userconfig{'reply_to'}) if ($userconfig{'reply_to'} ne '*'); print " ", "\n"; print " ", "\n"; } else { # Just show To: field print " ", "\n"; } $cc = &html_escape($cc); print " ", "\n"; print " ", "\n"; print " ", "\n"; print " ", "\n"; if (&has_command("gpg") && &foreign_check("gnupg")) { &foreign_require("gnupg", "gnupg-lib.pl"); local @keys = &foreign_call("gnupg", "list_keys"); if (@keys) { print "\n"; print "\n"; } } print "
$text{'mail_from'} ", @faddrs ? &address_button("from", 0, 1) : "","\n"; print "<\@"; if (@doms > 1) { print ">\n"; } else { print "$dom>\n"; print "\n"; } print &address_button("user", 0, 2, "real") if (@faddrs); print "",&html_escape($froms[0]),"$text{'mail_replyto'} ", @faddrs ? &address_button("replyto", 0, 1) : "","
$text{'mail_to'} ", &address_button("to"),"
$text{'mail_to'} ", &address_button("to"),"
$text{'mail_cc'} ", &address_button("cc"),"$text{'mail_bcc'} ", &address_button("bcc"),"
$text{'mail_subject'}$text{'mail_pri'}\n", "\n", "\n", "
\n", "  ", "
$text{'mail_sign'}\n"; print "$text{'mail_crypt'}\n"; print "

\n"; print "\n", "", "
$text{'reply_body'}
", "\n"; if (&has_command("ispell")) { print "
\n"; print " $text{'reply_spell'}\n"; } print "

\n"; # Display forwarded attachments if (@attach) { print "\n"; print "\n"; print "
$text{'reply_attach'}
\n"; foreach $a (@attach) { push(@titles, "{'idx'} checked> ".($a->{'filename'} ? $a->{'filename'} : $a->{'type'})); push(@links, "detach.cgi?idx=$in{'idx'}&folder=$in{'folder'}&attach=$a->{'idx'}$subs"); push(@icons, "images/boxes.gif"); } &icons_table(\@links, \@titles, \@icons, 8); print "

\n"; } # Display forwarded mails if (@mailforward) { print "\n"; print "\n"; print "
$text{'reply_mailforward'}
\n"; foreach $f (@mailforward) { push(@titles, &simplify_subject($mails[$f]->{'header'}->{'subject'})); push(@links, "view_mail.cgi?idx=$f&folder=$in{'folder'}"); push(@icons, "images/boxes.gif"); print "\n"; } &icons_table(\@links, \@titles, \@icons, 8); print "

\n"; } # Add form for more attachments print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; if ($config{'server_attach'}) { print "\n"; print "\n"; print "\n"; } print "
$text{'reply_attach2'}
", &file_chooser_button("file0")," ", &file_chooser_button("file1")," ", &file_chooser_button("file2"),"

\n"; print "  \n"; print "\n"; print "

\n"; print "
\n"; &footer("index.cgi?folder=$in{'folder'}", $text{'mail_return'}); &pop3_logout_all(); sub decode_and_sub { return if (!$mail); ¬es_decode($mail, $folder); &parse_mail($mail); @sub = split(/\0/, $in{'sub'}); $subs = join("", map { "&sub=$_" } @sub); foreach $s (@sub) { # We are looking at a mail within a mail .. &decrypt_attachments($mail); local $amail = &extract_mail( $mail->{'attach'}->[$s]->{'data'}); &parse_mail($amail); $mail = $amail; } ($deccode, $decmessage) = &decrypt_attachments($mail); } mailbox/CHANGES0100664000567100000120000000033410026476413013172 0ustar jcameronwheel---- Changes since 1.060 ---- Added links for switching between HTML and plain text view, and for showing the raw mail message. Improved the simple search function to accept 'and' and 'or' separated boolean expressions. mailbox/config-msc-linux0100664000567100000120000000050410035762242015301 0ustar jcameronwheeledit_from=1 mail_system=1 mail_dir=/var/spool/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/lib/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 pop_locks=1 no_crlf=0 mailbox/folders-lib.pl0100664000567100000120000005705510031435446014747 0ustar jcameronwheel# folders-lib.pl # Functions for dealing with mail folders in various formats $pop3_port = 110; $imap_port = 143; $cache_directory = $user_module_config_directory || $module_config_directory; # mailbox_list_mails(start, end, &folder, [headersonly], [&error]) sub mailbox_list_mails { if ($_[2]->{'type'} == 0) { # List a single mbox formatted file return &list_mails($_[2]->{'file'}, $_[0], $_[1]); } elsif ($_[2]->{'type'} == 1) { # List a qmail maildir local $md = $_[2]->{'file'}; return &list_maildir($md, $_[0], $_[1]); } elsif ($_[2]->{'type'} == 2) { # Get mail headers/body from a remote POP3 server # Login first local @rv = &pop3_login($_[2]); if ($rv[0] != 1) { # Failed to connect or login if ($_[4]) { @{$_[4]} = @rv; return (); } elsif ($rv[0] == 0) { &error($rv[1]); } else { &error(&text('save_elogin', $rv[1])); } } local $h = $rv[1]; local @uidl = &pop3_uidl($h); local %onserver = map { &safe_uidl($_), 1 } @uidl; # Work out what range we want local ($start, $end); if (!defined($_[0])) { $start = 0; $end = @uidl-1; } elsif ($_[1] < 0) { $start = @uidl+$_[1]-1; $end = @uidl+$_[0]-1; $start = $start<0 ? 0 : $start; } else { $start = $_[0]; $end = $_[1]; $end = @uidl-1 if ($end >= @uidl); } local @rv = map { undef } @uidl; # For each message in the range, get the headers or body local ($i, $f, %cached, %sizeneed); local $cd = "$cache_directory/$_[2]->{'id'}.cache"; if (opendir(CACHE, $cd)) { while($f = readdir(CACHE)) { if ($f =~ /^(\S+)\.body$/) { $cached{$1} = 2; } elsif ($f =~ /^(\S+)\.headers$/) { $cached{$1} = 1; } } closedir(CACHE); } else { mkdir($cd, 0700); } for($i=$start; $i<=$end; $i++) { local $u = &safe_uidl($uidl[$i]); if ($cached{$u} == 2 || $cached{$u} == 1 && $_[3]) { # We already have everything that we need } elsif ($cached{$u} == 1 || !$_[3]) { # We need to get the entire mail &pop3_command($h, "retr ".($i+1)); open(CACHE, ">$cd/$u.body"); while(<$h>) { s/\r//g; last if ($_ eq ".\n"); print CACHE $_; } close(CACHE); unlink("$cd/$u.headers"); $cached{$u} = 2; } else { # We just need the headers &pop3_command($h, "top ".($i+1)." 0"); open(CACHE, ">$cd/$u.headers"); while(<$h>) { s/\r//g; last if ($_ eq ".\n"); print CACHE $_; } close(CACHE); $cached{$u} = 1; } local $mail = &read_mail_file($cached{$u} == 2 ? "$cd/$u.body" : "$cd/$u.headers"); if ($cached{$u} == 1) { if ($mail->{'body'} ne "") { $mail->{'size'} = int($mail->{'body'}); } else { $sizeneed{$i} = 1; } } $mail->{'uidl'} = $uidl[$i]; $mail->{'idx'} = $i; $rv[$i] = $mail; } # Get sizes for mails if needed if (%sizeneed) { &pop3_command($h, "list"); while(<$h>) { s/\r//g; last if ($_ eq ".\n"); if (/^(\d+)\s+(\d+)/ && $sizeneed{$1-1}) { # Add size to the mail cache $rv[$1-1]->{'size'} = $2; local $u = &safe_uidl($uidl[$1-1]); open(CACHE, ">>$cd/$u.headers"); print CACHE $2,"\n"; close(CACHE); } } } # Clean up any cached mails that no longer exist on the server foreach $f (keys %cached) { if (!$onserver{$f}) { unlink($cached{$f} == 1 ? "$cd/$f.headers" : "$cd/$f.body"); } } return @rv; } elsif ($_[2]->{'type'} == 3) { # List an MH directory local $md = $_[2]->{'file'}; return &list_mhdir($md, $_[0], $_[1]); } elsif ($_[2]->{'type'} == 4) { # Get headers and possibly bodies from an IMAP server # Login and select the specified mailbox local @rv = &imap_login($_[2]); if ($rv[0] != 1) { # Something went wrong if ($_[4]) { @{$_[4]} = @rv; return (); } elsif ($rv[0] == 0) { &error($rv[1]); } elsif ($rv[0] == 3) { &error(&text('save_emailbox', $rv[1])); } elsif ($rv[0] == 2) { &error(&text('save_elogin2', $rv[1])); } } local $h = $rv[1]; local $count = $rv[2]; return () if (!$count); # Work out what range we want local ($start, $end); if (!defined($_[0])) { $start = 0; $end = $count-1; } elsif ($_[1] < 0) { $start = $count+$_[1]-1; $end = $count+$_[0]-1; $start = $start<0 ? 0 : $start; } else { $start = $_[0]; $end = $_[1]; $end = $count-1 if ($end >= $count); } local @mail = map { undef } (0 .. $count-1); # Get the headers or body of messages in the specified range local @rv; if ($_[3]) { # Just the headers @rv = &imap_command($h, sprintf "FETCH %d:%d (RFC822.SIZE RFC822.HEADER)", $start+1, $end+1); } else { # Whole messages @rv = &imap_command($h, sprintf "FETCH %d:%d RFC822", $start+1, $end+1); } # Parse the headers or whole messages that came back local $i; for($i=0; $i<@{$rv[1]}; $i++) { # Extract the actual mail part local $mail = &parse_imap_mail($rv[1]->[$i]); if ($mail) { $mail->{'idx'} = $start+$i; $mail[$start+$i] = $mail; } } return @mail; } } # mailbox_search_mail(&fields, andmode, &folder) sub mailbox_search_mail { if ($_[2]->{'type'} == 0) { # Just search an mbox format file return &advanced_search_mail($_[2]->{'file'}, $_[0], $_[1]); } elsif ($_[2]->{'type'} == 1) { # Search a maildir directory local $md = $_[2]->{'file'}; return &advanced_search_maildir($md, $_[0], $_[1]); } elsif ($_[2]->{'type'} == 2) { # Get all of the mail from the POP3 server and search it local @mails = &mailbox_list_mails(undef, undef, $_[2], &indexof('body', &search_fields($_[0])) >= 0 ? 0 : 1); local @rv = grep { &mail_matches($_[0], $_[1], $_) } @mails; } elsif ($_[2]->{'type'} == 3) { # Search an MH directory local $md = $_[2]->{'file'}; return &advanced_search_mhdir($md, $_[0], $_[1]); } elsif ($_[2]->{'type'} == 4) { # Use IMAP's remote search feature # XXX broken! local @rv = &imap_login($_[2]); if ($rv[0] == 0) { &error($rv[1]); } elsif ($rv[0] == 3) { &error(&text('save_emailbox', $rv[1])); } elsif ($rv[0] == 2) { &error(&text('save_elogin2', $rv[1])); } local $h = $rv[1]; # Do the search to get back a list of matching numbers local @search; foreach $f (@{$_[0]}) { local $field = $f->[0]; local $neg = ($field =~ s/^\!//); local $what = $f->[1]; $what = "\"$what\"" if ($field ne "size"); $field = "LARGER" if ($field eq "size"); local $search = uc($field)." ".$what.""; $search = "NOT $search" if ($neg); push(@searches, $search); } local $searches; if (@searches == 1) { $searches = $searches[0]; } elsif ($_[1]) { $searches = join(" ", @searches); } else { $searches = $searches[$#searches]; for($i=$#searches-1; $i>=0; $i--) { $searches = "or $searches[$i] ($searches)"; } } @rv = &imap_command($h, "SEARCH $searches"); &error(&text('save_esearch', $rv[3])) if (!$rv[0]); # Get and parse those specific messages local ($srch) = grep { $_ =~ /^\*\s+SEARCH/i } @{$rv[1]}; local @ids = split(/\s+/, $srch); shift(@ids); shift(@ids); # lose * SEARCH local (@mail, $idx); foreach $idx (@ids) { local @rv = &imap_command($h, "FETCH $idx (RFC822.SIZE RFC822.HEADER)"); &error(&text('save_esearch', $rv[3])) if (!$rv[0]); local $mail = &parse_imap_mail($rv[1]->[0]); if ($mail) { $mail->{'idx'} = $idx-1; push(@mail, $mail); } } return reverse(@mail); } } # mailbox_delete_mail(&folder, mail, ...) # Delete multiple messages from some folder sub mailbox_delete_mail { local $f = shift(@_); if ($userconfig{'delete_mode'} == 1 && !$f->{'trash'}) { # Copy to trash folder first local ($trash) = grep { $_->{'trash'} } &list_folders(); local $m; foreach $m (@_) { &write_mail_folder($m, $trash); } } if ($f->{'type'} == 0) { &delete_mail($f->{'file'}, @_); } elsif ($f->{'type'} == 1) { &delete_maildir(@_); } elsif ($f->{'type'} == 2) { # Login and delete from the POP3 server local @rv = &pop3_login($f); if ($rv[0] == 0) { &error($rv[1]); } elsif ($rv[0] == 2) { &error(&text('save_elogin', $rv[1])); } local $h = $rv[1]; local @uidl = &pop3_uidl($h); local $m; local $cd = "$cache_directory/$f->{'id'}.cache"; foreach $m (@_) { local $idx = &indexof($m->{'uidl'}, @uidl); if ($idx >= 0) { &pop3_command($h, "dele ".($idx+1)); local $u = &safe_uidl($m->{'uidl'}); unlink("$cd/$u.headers", "$cd/$u.body"); } } } elsif ($f->{'type'} == 3) { &delete_mhdir(@_); } elsif ($f->{'type'} == 4) { # Delete from the IMAP server local @rv = &imap_login($f); if ($rv[0] == 0) { &error($rv[1]); } elsif ($rv[0] == 3) { &error(&text('save_emailbox', $rv[1])); } elsif ($rv[0] == 2) { &error(&text('save_elogin2', $rv[1])); } local $h = $rv[1]; local $m; foreach $m (@_) { @rv = &imap_command($h, "STORE ".($m->{'idx'}+1). " +FLAGS (\\Deleted)"); &error(&text('save_edelete', $rv[3])) if (!$rv[0]); } @rv = &imap_command($h, "EXPUNGE"); &error(&text('save_edelete', $rv[3])) if (!$rv[0]); } } # mailbox_empty_folder(&folder) # Remove the entire contents of a mail folder sub mailbox_empty_folder { local $f = $_[0]; if ($f->{'type'} == 0) { # mbox format mail file &empty_mail($f->{'file'}); } elsif ($f->{'type'} == 1) { # qmail format maildir &empty_maildir($f->{'file'}); } elsif ($f->{'type'} == 2) { # POP3 server .. delete all messages local @rv = &pop3_login($f); if ($rv[0] == 0) { &error($rv[1]); } elsif ($rv[0] == 2) { &error(&text('save_elogin', $rv[1])); } local $h = $rv[1]; @rv = &pop3_command($h, "stat"); $rv[1] =~ /^(\d+)/ || return; local $count = $1; local $i; for($i=1; $i<=$count; $i++) { &pop3_command($h, "dele ".$i); } } elsif ($f->{'type'} == 3) { # mh format maildir &empty_mhdir($f->{'file'}); } elsif ($f->{'type'} == 4) { # IMAP server .. delete all messages local @rv = &imap_login($f); if ($rv[0] == 0) { &error($rv[1]); } elsif ($rv[0] == 3) { &error(&text('save_emailbox', $rv[1])); } elsif ($rv[0] == 2) { &error(&text('save_elogin2', $rv[1])); } local $h = $rv[1]; local $count = $rv[2]; local $i; for($i=1; $i<=$count; $i++) { @rv = &imap_command($h, "STORE ".$i. " +FLAGS (\\Deleted)"); &error(&text('save_edelete', $rv[3])) if (!$rv[0]); } @rv = &imap_command($h, "EXPUNGE"); &error(&text('save_edelete', $rv[3])) if (!$rv[0]); } } # mailbox_move_mail(&source, &dest, mail, ...) # Move mail from one folder to another sub mailbox_move_mail { local $src = shift(@_); local $dst = shift(@_); local $now = time(); local $hn = &get_system_hostname(); &create_folder_maildir($dst); if (($src->{'type'} == 1 || $src->{'type'} == 3) && $dst->{'type'} == 1) { # Can just move mail files local $dd = $dst->{'file'}; &create_folder_maildir($dst); foreach $m (@_) { rename($m->{'file'}, "$dd/cur/$now.$$.$hn"); $now++; } } elsif (($src->{'type'} == 1 || $src->{'type'} == 3) && $dst->{'type'} == 3) { # Can move and rename to MH numbering local $dd = $dst->{'file'}; local $num = &max_mhdir($dst->{'file'}) + 1; foreach $m (@_) { rename($m->{'file'}, "$dd/$num"); $num++; } } else { # Append to new folder file, or create in folder directory local $m; foreach $m (@_) { &write_mail_folder($m, $dst); } &mailbox_delete_mail($src, @_); } } # mailbox_copy_mail(&source, &dest, mail, ...) # Copy mail from one folder to another sub mailbox_copy_mail { local $src = shift(@_); local $dst = shift(@_); local $now = time(); local $hn = &get_system_hostname(); &create_folder_maildir($dst); local $m; foreach $m (@_) { &write_mail_folder($m, $dst); } } # folder_type(file_or_dir) sub folder_type { return -d "$_[0]/cur" ? 1 : -d $_[0] ? 3 : 0; } # create_folder_maildir(&folder) # Ensure that a maildir folder has the needed new, cur and tmp directories sub create_folder_maildir { mkdir($folders_dir, 0700); if ($_[0]->{'type'} == 1) { local $id = $_[0]->{'file'}; mkdir("$id/cur", 0700); mkdir("$id/new", 0700); mkdir("$id/tmp", 0700); } } # write_mail_folder(&mail, &folder, textonly) # Writes some mail message to a folder sub write_mail_folder { &create_folder_maildir($_[1]); if ($_[1]->{'type'} == 1) { # Add to a maildir directory local $md = $_[1]->{'file'}; &write_maildir($_[0], $md, $_[2]); } elsif ($_[1]->{'type'} == 3) { # Create a new MH file local $num = &max_mhdir($_[1]->{'file'}) + 1; local $md = $_[1]->{'file'}; &send_mail($_[0], "$md/$num", $_[2], 1); } elsif ($_[1]->{'type'} == 0) { # Just append to the folder file &send_mail($_[0], $_[1]->{'file'}, $_[2], 1); } elsif ($_[1]->{'type'} == 4) { # Upload to the IMAP server local @rv = &imap_login($_[1]); if ($rv[0] == 0) { &error($rv[1]); } elsif ($rv[0] == 3) { &error(&text('save_emailbox', $rv[1])); } elsif ($rv[0] == 2) { &error(&text('save_elogin2', $rv[1])); } local $h = $rv[1]; # Create a temp file and use it to create the IMAP command local $temp = &tempname(); &send_mail($_[0], $temp, $_[2], 1); open(TEMP, $temp); local $text; while() { $text .= $_; } close(TEMP); unlink($temp); @rv = &imap_command($h, sprintf "APPEND %s {%d}\r\n%s", $_[1]->{'mailbox'} || "INBOX", length($text), $text); &error(&text('save_eappend', $rv[3])) if (!$rv[0]); } } # mailbox_modify_mail(&oldmail, &newmail, &folder, textonly) # Replaces some mail message with a new one sub mailbox_modify_mail { if ($_[2]->{'type'} == 1) { # Just replace the existing file &modify_maildir($_[0], $_[1], $_[3]); } elsif ($_[2]->{'type'} == 3) { # Just replace the existing file &modify_mhdir($_[0], $_[1], $_[3]); } else { # Modify the mail file &modify_mail($_[2]->{'file'}, $_[0], $_[1], $_[3]); } } # pop3_login(&folder) # Logs into a POP3 server and returns a status (1=ok, 0=connect failed, # 2=login failed) and handle or error message sub pop3_login { local $h = $pop3_login_handle{$_[0]->{'id'}}; return (1, $h) if ($h); $h = time().++$pop3_login_count; &open_socket($_[0]->{'server'}, $_[0]->{'port'} || 110, $h, \$error); return (0, $error) if ($error); local $os = select($h); $| = 1; select($os); local @rv = &pop3_command($h); return (0, $rv[1]) if (!$rv[0]); @rv = &pop3_command($h, "user $_[0]->{'user'}"); return (2, $rv[1]) if (!$rv[0]); @rv = &pop3_command($h, "pass $_[0]->{'pass'}"); return (2, $rv[1]) if (!$rv[0]); return (1, $pop3_login_handle{$_[0]->{'id'}} = $h); } # pop3_command(handle, command) # Executes a command and returns the status (1 or 0 for OK or ERR) and message sub pop3_command { local ($h, $c) = @_; print $h "$c\r\n" if ($c); local $rv = <$h>; $rv =~ s/\r|\n//g; return !$rv ? ( 0, "Connection closed" ) : $rv =~ /^\+OK\s*(.*)/ ? ( 1, $1 ) : $rv =~ /^\-ERR\s*(.*)/ ? ( 0, $1 ) : ( 0, $rv ); } # pop3_logout(handle, doquit) sub pop3_logout { local @rv = $_[1] ? &pop3_command($_[0], "quit") : (1, undef); local $f; foreach $f (keys %pop3_login_handle) { delete($pop3_login_handle{$f}) if ($pop3_login_handle{$f} eq $_[0]); } close($_[0]); return @rv; } # pop3_uidl(handle) # Returns the uidl list sub pop3_uidl { local @rv; local $h = $_[0]; &pop3_command($h, "uidl"); while(<$h>) { s/\r//g; last if ($_ eq ".\n"); if (/^(\d+)\s+(\S+)/) { push(@rv, $2); } } return @rv; } # pop3_logout_all() # Properly closes all open POP3 and IMAP sessions sub pop3_logout_all { local $f; foreach $f (keys %pop3_login_handle) { &pop3_logout($pop3_login_handle{$f}, 1); } foreach $f (keys %imap_login_handle) { &imap_logout($imap_login_handle{$f}, 1); } } # imap_login(&folder) # Logs into a POP3 server, selects a mailbox and returns a status # (1=ok, 0=connect failed, 2=login failed, 3=mailbox error), a handle or error # message, and the number of messages in the mailbox. sub imap_login { local $h = $imap_login_handle{$_[0]->{'id'}}; return (1, $h) if ($h); $h = time().++$imap_login_count; local $error; &open_socket($_[0]->{'server'}, $_[0]->{'port'} || $imap_port, $h, \$error); return (0, $error) if ($error); local $os = select($h); $| = 1; select($os); # Login normally local @rv = &imap_command($h); return (0, $rv[3]) if (!$rv[0]); @rv = &imap_command($h, "login \"$_[0]->{'user'}\" \"$_[0]->{'pass'}\""); return (2, $rv[3]) if (!$rv[0]); # Select the right folder @rv = &imap_command($h, "select ".($_[0]->{'mailbox'} || "INBOX")); return (3, $rv[3]) if (!$rv[0]); return (1, $imap_login_handle{$_[0]->{'id'}} = $h, $rv[2] =~ /\*\s+(\d+)\s+EXISTS/i ? $1 : undef); } # imap_command(handle, command) # Executes an IMAP command and returns 1 for success or 0 for failure, and # a reference to an array of results (some of which may be multiline), and # all of the results joined together, and the stuff after OK/BAD sub imap_command { local ($h, $c) = @_; local @rv; # Send the command, and read lines until a non-* one is found local $id = $$."-".$imap_command_count++; if ($c) { print $h "$id $c\r\n"; } while(1) { local $l = <$h>; last if (!$l); if ($l =~ /^(\*|\+)/) { # Another response, and possibly the only one if no command # was sent. push(@rv, $l); last if (!$c); if ($l =~ /\{(\d+)\}\s*$/) { # Start of multi-line text .. read the specified size local $size = $1; local $got; local $err = "Error reading email"; while($got < $size) { local $buf; local $r = read($h, $buf, $size-$got); return (0, [ $err ], $err, $err) if ($r < 0); $rv[$#rv] .= $buf; $got += $r; } } } elsif ($l =~ /^(\S+)\s+/ && $1 eq $id) { # End of responses push(@rv, $l); last; } else { # Part of last response if (!@rv) { local $err = "Got unknown line $l"; return (0, [ $err ], $err, $err); } $rv[$#rv] .= $l; } } local $j = join("", @rv); local $lline = $rv[$#rv]; if ($lline =~ /^(\S+)\s+OK\s*(.*)/) { # Looks like the command worked return (1, \@rv, $j, $2); } else { # Command failed! return (0, \@rv, $j, $lline =~ /^(\S+)\s+(\S+)\s*(.*)/ ? $3 : undef); } } # imap_logout(handle, doquit) sub imap_logout { local @rv = $_[1] ? &imap_command($_[0], "close") : (1, undef); local $f; foreach $f (keys %imap_login_handle) { delete($imap_login_handle{$f}) if ($imap_login_handle{$f} eq $_[0]); } close($_[0]); return @rv; } # lock_folder(&folder) sub lock_folder { return if ($_[0]->{'remote'}); local $f = $_[0]->{'file'} ? $_[0]->{'file'} : $_[0]->{'type'} == 0 ? &user_mail_file($remote_user) : $qmail_maildir; if (&lock_file($f)) { $_[0]->{'lock'} = $f; } else { # Cannot lock if in /var/mail local $ff = $f; $ff =~ s/\//_/g; $ff = "/tmp/$ff"; $_[0]->{'lock'} = $ff; &lock_file($ff); } # Also, check for a .filename.pop3 file if ($config{'pop_locks'} && $f =~ /^(\S+)\/([^\/]+)$/) { local $poplf = "$1/.$2.pop"; local $count = 0; while(-r $poplf) { sleep(1); if ($count++ > 5*60) { # Give up after 5 minutes &error(&text('epop3lock_tries', "$f", 5)); } } } } # unlock_folder(&folder) sub unlock_folder { return if ($_[0]->{'remote'}); &unlock_file($_[0]->{'lock'}); } # folder_file(&folder) # Returns the full path to the file or directory containing the folder's mail, # or undef if not appropriate (such as for POP3) sub folder_file { return $_[0]->{'remote'} ? undef : $_[0]->{'file'}; } # parse_imap_mail(response) # Parses a response from the IMAP server into a standard mail structure sub parse_imap_mail { # Extract the actual mail part local $mail = { }; local $realsize; local $imap = $_[0]; if ($imap =~ /RFC822.SIZE\s+(\d+)/) { $realsize = $1; } $imap =~ s/^\*\s+\d+\s+FETCH.*\{(\d+)\}\r?\n// || return undef; local $size = $1; local @lines = split(/\n/, substr($imap, 0, $size)); # Parse the headers local $lnum = 0; local @headers; while(1) { local $line = $lines[$lnum++]; $mail->{'size'} += length($line); $line =~ s/\r//g; last if ($line eq ''); if ($line =~ /^(\S+):\s*(.*)/) { push(@headers, [ $1, $2 ]); } elsif ($line =~ /^(\s+.*)/) { $headers[$#headers]->[1] .= $1 unless($#headers < 0); } } $mail->{'headers'} = \@headers; foreach $h (@headers) { $mail->{'header'}->{lc($h->[0])} = $h->[1]; } # Parse the body while($lnum < @lines) { $mail->{'size'} += length($lines[$lnum]+1); $mail->{'body'} .= $lines[$lnum]."\n"; $lnum++; } $mail->{'size'} = $realsize if ($realsize); return $mail; } # find_body(&mail, mode) # Returns the plain text body, html body and the one to use sub find_body { local ($a, $body, $textbody, $htmlbody); foreach $a (@{$_[0]->{'attach'}}) { if ($a->{'type'} =~ /^text\/plain/i || $a->{'type'} eq 'text') { $textbody = $a if (!$textbody && $a->{'data'} =~ /\S/); } elsif ($a->{'type'} =~ /^text\/html/i) { $htmlbody = $a if (!$htmlbody && $a->{'data'} =~ /\S/); } } if ($_[1] == 0) { $body = $textbody; } elsif ($_[1] == 1) { $body = $textbody || $htmlbody; } elsif ($_[1] == 2) { $body = $htmlbody || $textbody; } elsif ($_[1] == 3) { # Convert HTML to text if needed if ($textbody) { $body = $textbody; } else { local $text = &html_to_text($htmlbody->{'data'}); $body = $textbody = { 'data' => $text }; } } return ($textbody, $htmlbody, $body); } # safe_html(html) # Converts HTML to a form safe for inclusion in a page sub safe_html { local $html = $_[0]; $html =~ s/^[\000-\377]*//i; $html =~ s/<\/BODY>[\000-\377]*$//i; $html = &filter_javascript($html); $html =~ s/(href\s*=\s*)[\/\.]+/$1/ig; $html =~ s/(src\s*=\s*)[\/\.]+/$1/ig; return $html; } # safe_uidl(string) sub safe_uidl { local $rv = $_[0]; $rv =~ s/\/|\./_/g; return $rv; } # html_to_text(html) # Attempts to convert some HTML to text form sub html_to_text { local ($h2, $lynx); if (($h2 = &has_command("html2text")) || ($lynx = &has_command("lynx"))) { # Can use a commonly available external program local $temp = &tempname().".html"; open(TEMP, ">$temp"); print TEMP $_[0]; close(TEMP); open(OUT, ($lynx ? "$lynx -dump $temp" : "$h2 $temp")." 2>/dev/null |"); while() { if ($lynx && $_ =~ /^\s*References\s*$/) { # Start of Lynx references output $gotrefs++; } elsif ($lynx && $gotrefs && $_ =~ /^\s*(\d+)\.\s+(http|https|ftp|mailto)/) { # Skip this URL reference line } else { $text .= $_; } } close(OUT); unlink($temp); return $text; } else { # Do conversion manually :( local $html = $_[0]; $html =~ s/\s+/ /g; $html =~ s/

/\n\n/gi; $html =~ s/
/\n/gi; $html =~ s/<[^>]+>//g; $html = &entities_to_ascii($html); return $html; } } # folder_select(&folders, selected-folder, name, [extra-options]) # Returns HTML for selecting a folder sub folder_select { local $sel = "\n"; return $sel; } # folder_size(&folder, ...) # Sets the 'size' field of one or more folders sub folder_size { local ($f, $total); foreach $f (@_) { if ($f->{'type'} == 0) { local @st = stat($f->{'file'}); $f->{'size'} = $st[7]; } elsif ($f->{'type'} == 1 || $f->{'type'} == 3) { $f->{'size'} = &disk_usage_kb($f->{'file'})*1024; } else { $f->{'size'} = undef; } $total += $f->{'size'}; } return $total; } # parse_boolean(string) # Separates a string into a series of and/or separated values. Returns a # mode number (0=or, 1=and, 2=both) and a list of words sub parse_boolean { local @rv; local $str = $_[0]; local $mode = -1; local $lastandor = 0; while($str =~ /^\s*"([^"]*)"(.*)$/ || $str =~ /^\s*"([^"]*)"(.*)$/ || $str =~ /^\s*(\S+)(.*)$/) { local $word = $1; $str = $2; if (lc($word) eq "and") { if ($mode < 0) { $mode = 1; } elsif ($mode != 1) { $mode = 2; } $lastandor = 1; } elsif (lc($word) eq "or") { if ($mode < 0) { $mode = 0; } elsif ($mode != 0) { $mode = 2; } $lastandor = 1; } else { if (!$lastandor && @rv) { $rv[$#rv] .= " ".$word; } else { push(@rv, $word); } $lastandor = 0; } } $mode = 0 if ($mode < 0); return ($mode, \@rv); } # recursive_files(dir, do-subdirs) sub recursive_files { local ($f, @rv); opendir(DIR, $_[0]); local @files = readdir(DIR); closedir(DIR); foreach $f (@files) { next if ($f =~ /^\./ || $f =~ /\.lock$/i); local $p = "$_[0]/$f"; if ($_[1] || !-d $p || -d "$p/cur") { push(@rv, $p); } else { push(@rv, &recursive_files($p)); } } return @rv; } 1; mailbox/config-osf10100664000567100000120000000047110035762242014235 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/spool/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/sbin/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/search_form.cgi0100775000567100000120000000321707766047447015203 0ustar jcameronwheel#!/usr/local/bin/perl # search_form.cgi # Display a form for searching a mailbox require './mailbox-lib.pl'; &ReadParse(); @folders = &list_folders_sorted(); ($folder) = grep { $_->{'index'} == $in{'folder'} } @folders; $module_index_link = "/$module_name/index.cgi?folder=$in{'folder'}"; &header($text{'sform_title'}, ""); print "


\n"; print "
\n"; print " $text{'sform_and'}\n"; print " $text{'sform_or'}

\n"; print "\n"; #print " ", # " ", # "\n"; for($i=0; $i<=9; $i++) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } print "
$text{'sform_field'}$text{'sform_mode'}$text{'sform_for'}
$text{'sform_where'}$text{'sform_text'}

\n"; $extra = <$text{'sform_all'} \n"; print "


\n"; &footer("index.cgi?folder=$in{'folder'}", $text{'mail_return'}); mailbox/config-freebsd0100664000567100000120000000046310035762242015000 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/sbin/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config-hpux0100664000567100000120000000046310035762242014352 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/sbin/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config-irix0100664000567100000120000000046210035762242014340 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/lib/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config-macos0100664000567100000120000000046310035762242014470 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/sbin/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config-netbsd0100664000567100000120000000046310035762242014645 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/sbin/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config-openbsd0100664000567100000120000000046310035762242015020 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/sbin/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config-openserver0100664000567100000120000000047010035762242015554 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/usr/spool/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/lib/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config-solaris0100664000567100000120000000046210035762242015041 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/lib/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/config-unixware0100664000567100000120000000046210035762242015227 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/lib/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0 mailbox/delete_mail.cgi0100755000567100000120000000752710023256346015141 0ustar jcameronwheel#!/usr/local/bin/perl # delete_mail.cgi # Delete, mark, move or copy multiple messages require './mailbox-lib.pl'; &ReadParse(); @delete = sort { $a <=> $b } split(/\0/, $in{'d'}); @folders = &list_folders(); $folder = $folders[$in{'folder'}]; if ($in{'mark1'} || $in{'mark2'}) { # Marking emails with some status @delete || &error($text{'delete_emnone'}); @mail = &mailbox_list_mails($delete[0], $delete[@delete-1], $folder); dbmopen(%read, "$user_module_config_directory/read", 0600); local $m = $in{'mark1'} ? $in{'mode1'} : $in{'mode2'}; foreach $d (@delete) { local $hid = $mail[$d]->{'header'}->{'message-id'}; if ($m) { $read{$hid} = $m; } else { delete($read{$hid}); } } dbmclose(%read); $perpage = $folder->{'perpage'} || $userconfig{'perpage'}; $s = int((@mail - $delete[0] - 1) / $perpage) * $perpage; &redirect("index.cgi?start=$s&folder=$in{'folder'}"); } elsif ($in{'move1'} || $in{'move2'}) { # Moving mails to some other folder @delete || &error($text{'delete_emnone'}); $mfolder = $folders[$in{'move1'} ? $in{'mfolder1'} : $in{'mfolder2'}]; @mail = &mailbox_list_mails($delete[0], $delete[@delete-1], $folder); foreach $d (@delete) { $mail[$d] || &error($text{'mail_eexists'}); push(@movemail, $mail[$d]); } &lock_folder($folder); &lock_folder($mfolder); &mailbox_move_mail($folder, $mfolder, @movemail); &unlock_folder($mfolder); &unlock_folder($folder); &redirect("index.cgi?folder=$in{'folder'}"); } elsif ($in{'copy1'} || $in{'copy2'}) { # Copying mails to some other folder @delete || &error($text{'delete_emnone'}); $cfolder = $folders[$in{'copy1'} ? $in{'mfolder1'} : $in{'mfolder2'}]; @mail = &mailbox_list_mails($delete[0], $delete[@delete-1], $folder); foreach $d (@delete) { $mail[$d] || &error($text{'mail_eexists'}); push(@copymail, $mail[$d]); } &lock_folder($cfolder); &mailbox_copy_mail($folder, $cfolder, @copymail); &unlock_folder($cfolder); &redirect("index.cgi?folder=$in{'folder'}"); } elsif ($in{'forward'}) { # Forwarding selected mails .. redirect @delete || &error($text{'delete_efnone'}); &redirect("reply_mail.cgi?folder=$in{'folder'}&". join("&", map { "mailforward=$_" } @delete)); } elsif ($in{'new'}) { # Need to redirect to compose form &redirect("reply_mail.cgi?new=1&folder=$in{'folder'}"); } else { # Just deleting emails @delete || $in{'all'} || &error($text{'delete_enone'}); if (!$in{'confirm'} && &need_delete_warn($folder)) { # Need to ask for confirmation before deleting &header($text{'confirm_title'}, ""); print &check_clicks_function(); print "
\n"; print "
\n"; foreach $i (keys %in) { foreach $v (split(/\0/, $in{$i})) { print "\n"; } } print "
\n"; if ($in{'all'}) { print &text('confirm_warnall'),"
\n"; } else { print &text('confirm_warn', scalar(@delete)),"
\n"; } if ($userconfig{'delete_warn'} ne 'y') { print "$text{'confirm_warn2'}

\n" } else { print "$text{'confirm_warn4'}

\n" } print "

\n"; print "
\n"; &footer("index.cgi?folder=$in{'folder'}", $text{'index'}); } else { # Go ahead and delete $gconfig{'logfiles'} = 0; &lock_folder($folder); if ($in{'all'}) { # Clear the whole folder &mailbox_empty_folder($folder); } else { # Just delete selected messages @mail = &mailbox_list_mails($delete[0], $delete[@delete-1], $folder); foreach $d (@delete) { $mail[$d] || &error($text{'mail_eexists'}); push(@delmail, $mail[$d]); } &mailbox_delete_mail($folder, @delmail); } &unlock_folder($folder); &redirect("index.cgi?folder=$in{'folder'}"); } } &pop3_logout_all(); mailbox/detach.cgi0100755000567100000120000000505407775773615014145 0ustar jcameronwheel#!/usr/local/bin/perl # detach.cgi # View one attachment from a message use Socket; require './mailbox-lib.pl'; &ReadParse(); @folders = &list_folders(); $folder = $folders[$in{'folder'}]; @mail = &mailbox_list_mails($in{'idx'}, $in{'idx'}, $folder); $mail = $mail[$in{'idx'}]; &parse_mail($mail); @sub = split(/\0/, $in{'sub'}); foreach $s (@sub) { # We are looking at a mail within a mail .. &decrypt_attachments($mail); local $amail = &extract_mail($mail->{'attach'}->[$s]->{'data'}); &parse_mail($amail); $mail = $amail; } &decrypt_attachments($mail); $attach = $mail->{'attach'}->[$in{'attach'}]; if ($in{'scale'}) { # Scale the gif or jpeg image to 48 pixels high local $temp = &tempname(); open(TEMP, ">$temp"); print TEMP $attach->{'data'}; close(TEMP); $SIG{'CHLD'} = sub { wait; }; if ($attach->{'type'} eq 'image/gif') { ($pnmin, $pnmout) = &pipeopen("giftopnm $temp"); } elsif ($attach->{'type'} eq 'image/jpeg') { ($pnmin, $pnmout) = &pipeopen("djpeg -fast $temp"); } else { &dump_erroricon(); } close($pnmin); $type = <$pnmout>; $size = <$pnmout>; unlink($temp); $type =~ /^P[0-9]/ || &dump_erroricon(); $size =~ /(\d+)\s+(\d+)/ || &dump_erroricon(); ($w, $h) = ($1, $2); if ($w > 48) { $scale = 48.0 / $w; } else { $scale = 48.0 / $h; } ($jpegin, $jpegout) = &pipeopen("pnmscale $scale 2>/dev/null | cjpeg"); print $jpegin $type; print $jpegin $size; while(read($pnmout, $buf, 1024)) { print $jpegin $buf; } close($jpegin); close($pnmout); print "Content-type: image/jpeg\n\n"; while(read($jpegout, $buf, 1024)) { print $buf; } close($jpegout); } else { # Just output the attachment print "X-no-links: 1\n"; if ($attach->{'type'} eq 'message/delivery-status') { print "Content-type: text/plain\n\n"; } else { print "Content-type: $attach->{'type'}\n\n"; } if ($attach->{'type'} =~ /^text\/html/i) { print &filter_javascript($attach->{'data'}); } else { print $attach->{'data'}; } } &pop3_logout_all(); sub dump_erroricon { print "Content-type: image/gif\n\n"; open(ICON, "images/error.gif"); while() { print; } close(ICON); exit; } # pipeopen(command) sub pipeopen { $pipe++; local $inr = "INr$pipe"; local $inw = "INw$pipe"; local $outr = "OUTr$pipe"; local $outw = "OUTw$pipe"; pipe($inr, $inw); pipe($outr, $outw); if (!fork()) { untie(*STDIN); untie(*STDOUT); open(STDIN, "<&$inr"); open(STDOUT, ">&$outw"); close($inw); close($outr); exec($_[0]); print STDERR "exec failed : $!\n"; exit 1; } close($inr); close($outw); return ($inw, $outr); } mailbox/send_mail.cgi0100755000567100000120000003052710035762405014625 0ustar jcameronwheel#!/usr/local/bin/perl # send_mail.cgi # Send off an email message require './mailbox-lib.pl'; # Check inputs &ReadParseMime(); $module_index_link = "/$module_name/index.cgi?folder=$in{'folder'}"; @folders = &list_folders(); $folder = $folders[$in{'folder'}]; &error_setup($text{'send_err'}); $in{'to'} || &error($text{'send_eto'}); @sub = split(/\0/, $in{'sub'}); $subs = join("", map { "&sub=$_" } @sub); # Construct the email if ($config{'edit_from'} == 2) { $in{'user'} || &error($text{'send_efrom'}); $in{'from'} = $in{'dom'} ? "$in{'user'}\@$in{'dom'}" : $in{'user'}; if ($in{'real'}) { $in{'from'} = "\"$in{'real'}\" <$in{'from'}>"; } } else { $in{'from'} || &error($text{'send_efrom'}); } $in{'to'} = &expand_to($in{'to'}); $in{'cc'} = &expand_to($in{'cc'}); $in{'bcc'} = &expand_to($in{'bcc'}); $mail->{'headers'} = [ [ 'From', $in{'from'} ], [ 'Subject', $in{'subject'} ], [ 'To', $in{'to'} ], [ 'Cc', $in{'cc'} ], [ 'Bcc', $in{'bcc'} ], [ 'X-Originating-IP', $ENV{'REMOTE_ADDR'} ], [ 'X-Mailer', "Usermin ".&get_webmin_version() ] ]; push(@{$mail->{'headers'}}, [ 'X-Priority', $in{'pri'} ]) if ($in{'pri'}); if ($in{'replyto'}) { # Add real name to reply-to address, if not given and if possible local $r2 = $in{'replyto'}; local ($r2parts) = &split_addresses($r2); $r2 = $r2parts->[1] || !$userconfig{'real_name'} || !$remote_user_info[6] ? $in{'replyto'} : "\"$remote_user_info[6]\" <$r2parts->[0]>"; push(@{$mail->{'headers'}}, [ 'Reply-To', $r2 ]); } $in{'body'} =~ s/\r//g; if ($in{'body'} =~ /\S/) { if ($in{'spell'}) { pipe(INr, INw); pipe(OUTr, OUTw); select(INw); $| = 1; select(OUTr); $| = 1; select(STDOUT); if (!fork()) { close(INw); close(OUTr); untie(*STDIN); untie(*STDOUT); untie(*STDERR); open(STDOUT, ">&OUTw"); open(STDERR, ">/dev/null"); open(STDIN, "<&INr"); exec("ispell -a"); exit; } close(INr); close(OUTw); local $indent = " " x 4; local @errs; foreach $line (split(/\n+/, $in{'body'})) { next if ($line !~ /\S/); print INw $line,"\n"; local @lerrs; while(1) { ($spell = ) =~ s/\r|\n//g; last if (!$spell); if ($spell =~ /^#\s+(\S+)/) { # Totally unknown word push(@lerrs, $indent.&text('send_eword', "".&html_escape($1)."")); } elsif ($spell =~ /^&\s+(\S+)\s+(\d+)\s+(\d+):\s+(.*)/) { # Maybe possible word, with options push(@lerrs, $indent.&text('send_eword2', "".&html_escape($1)."", "".&html_escape($4)."")); } elsif ($spell =~ /^\?\s+(\S+)/) { # Maybe possible word push(@lerrs, $indent.&text('send_eword', "".&html_escape($1)."")); } } if (@lerrs) { push(@errs, &text('send_eline', "".&html_escape($line)."")."
".join("
", @lerrs)."

\n"); } } close(INw); close(OUTr); if (@errs) { # Spelling errors found! &header($text{'compose_title'}, ""); print "


\n"; print "$text{'send_espell'}

\n"; print @errs; print "


\n"; &footer("index.cgi?folder=$in{'folder'}", $text{'mail_return'}); exit; } } local $mt = "text/plain; charset=$userconfig{'charset'}"; if ($in{'body'} =~ /[\177-\377]/) { # Contains 8-bit characters .. need to make quoted-printable $quoted_printable++; @attach = ( { 'headers' => [ [ 'Content-Type', $mt ], [ 'Content-Transfer-Encoding', 'quoted-printable' ] ], 'data' => quoted_encode($in{'body'}) } ); } else { # Plain 7-bit ascii text @attach = ( { 'headers' => [ [ 'Content-Type', $mt ], [ 'Content-Transfer-Encoding', '7bit' ] ], 'data' => $in{'body'} } ); } $bodyattach = $attach[0]; } $attachsize = 0; foreach $i (0 .. 5) { # Add uploaded attachment next if (!$in{"attach$i"}); &test_max_attach($attachsize); if ($config{'max_attach'} && $attachsize > $config{'max_attach'}) { &error(&text('send_eattachsize', $config{'max_attach'})); } local $filename = $in{"attach${i}_filename"}; $filename =~ s/^.*(\\|\/)//; local $type = $in{"attach${i}_content_type"}."; name=\"". $filename."\""; local $disp = "inline; filename=\"".$filename."\""; push(@attach, { 'data' => $in{"attach${i}"}, 'headers' => [ [ 'Content-type', $type ], [ 'Content-Disposition', $disp ], [ 'Content-Transfer-Encoding', 'base64' ] ] }); } foreach $i (0 .. 2) { # Add server-side attachment next if (!$in{"file$i"} || !$config{'server_attach'}); if ($in{"file$i"} !~ /^\//) { $in{"file$i"} = $remote_user_info[7]."/".$in{"file$i"}; } -r $in{"file$i"} && !-d $in{"file$i"} || &error(&text('send_efile', $in{"file$i"})); local @st = stat($in{"file$i"}); &test_max_attach($st[7]); local $data; open(DATA, $in{"file$i"}) || &error(&text('send_efile', $in{"file$i"})); while() { $data .= $_; } close(DATA); $in{"file$i"} =~ s/^.*\///; local $type = &guess_type($in{"file$i"})."; name=\"".$in{"file$i"}."\""; local $disp = "inline; filename=\"".$in{"file$i"}."\""; push(@attach, { 'data' => $data, 'headers' => [ [ 'Content-type', $type ], [ 'Content-Disposition', $disp ], [ 'Content-Transfer-Encoding', 'base64' ] ] }); } @fwd = split(/\0/, $in{'forward'}); if (@fwd) { # Add forwarded attachments @mail = &mailbox_list_mails($in{'idx'}, $in{'idx'}, $folder); $fwdmail = $mail[$in{'idx'}]; &parse_mail($fwdmail); &decrypt_attachments($fwdmail); foreach $s (@sub) { # We are looking at a mail within a mail .. &decrypt_attachments($fwdmail); local $amail = &extract_mail($fwdmail->{'attach'}->[$s]->{'data'}); &parse_mail($amail); $fwdmail = $amail; } foreach $f (@fwd) { &test_max_attach(length($fwdmail->{'attach'}->[$f]->{'data'})); push(@attach, $fwdmail->{'attach'}->[$f]); } } @mailfwd = split(/\0/, $in{'mailforward'}); if (@mailfwd) { # Add forwarded emails @mail = &mailbox_list_mails($mailfwd[0], $mailfwd[@mailfwd-1], $folder); foreach $f (@mailfwd) { $fwdmail = $mail[$f]; local $headertext; foreach $h (@{$fwdmail->{'headers'}}) { $headertext .= $h->[0].": ".$h->[1]."\n"; } push(@attach, { 'data' => $headertext."\n".$fwdmail->{'body'}, 'headers' => [ [ 'Content-type', 'message/rfc822' ], [ 'Content-Description', $fwdmail->{'header'}->{'subject'} ] ] }); } } if ($in{'sign'} ne '' && !$in{'draft'}) { # Put all the attachments into a single attachment, with the signature # as the second attachment &foreign_require("gnupg", "gnupg-lib.pl"); local @keys = &foreign_call("gnupg", "list_keys"); $key = $keys[$in{'sign'}]; # Create the new attachment push(@{$mail->{'headers'}}, [ 'Content-Type', 'multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"' ] ); local ($tempdata, $tempbody); if (@attach == 1) { # Just use one part $tempdata = &write_attachment($attach[0]); $tempheaders = $attach[0]->{'headers'}; $tempbody = $attach[0]->{'data'}; } else { # Create new attachment containing all the parts local $bound = "sign".time(); foreach $a (@attach) { $tempbody .= "\r\n"; $tempbody .= "--".$bound."\r\n"; $tempbody .= &write_attachment($a); } $tempbody .= "\r\n"; $tempbody .= "--".$bound."--\r\n"; $tempdata ="Content-Type: multipart/mixed; boundary=\"$bound\"\r\n". "\r\n". $tempbody; $tempheaders = [ [ "Content-Type", "multipart/mixed; boundary=\"$bound\"" ] ]; } # Sign the file local $sigdata; local $rv = &foreign_call("gnupg", "sign_data", $tempdata, \$sigdata, $key, 2); if ($rv) { &error(&text('send_esign', $rv)); } @attach = ( { 'data' => $tempbody, 'headers' => $tempheaders }, { 'data' => $sigdata, 'headers' => [ [ "Content-Type", "application/pgp-signature; name=signature.asc" ] ] } ); } $mail->{'attach'} = \@attach; if ($in{'crypt'} ne '' && !$in{'draft'}) { # Encrypt the entire mail &foreign_require("gnupg", "gnupg-lib.pl"); local @keys = &foreign_call("gnupg", "list_keys"); local @ekeys; local $key; if ($in{'crypt'} == -1) { # Find the keys for the To:, Cc: and Bcc: address local @addrs = ( &address_parts($in{'to'}), &address_parts($in{'cc'}), &address_parts($in{'bcc'}) ); local $a; foreach $a (@addrs) { local $found; foreach $k (@keys) { if (&indexof($a, @{$k->{'email'}}) >= 0) { push(@ekeys, $k); $found++; last; } } &error(&text('send_ekey', $a)) if (!$found); } } else { @ekeys = ( $keys[$in{'crypt'}] ); } if ($userconfig{'self_crypt'}) { local ($skey) = grep { $_->{'secret'} } @keys; push(@ekeys, $skey); } local $temp = &tempname(); &send_mail($mail, $temp); local ($tempdata, $buf); open(TEMP, $temp); local $dummy = ; # skip From line while(read(TEMP, $buf, 1024) > 0) { $tempdata .= $buf; } close(TEMP); unlink($temp); local $crypted; local $rv = &foreign_call("gnupg", "encrypt_data", $tempdata, \$crypted, \@ekeys, 1); $rv && &error(&text('send_ecrypt', $rv)); # Put into new attachments format $mail->{'headers'} = [ ( grep { lc($_->[0]) ne 'content-type' } @{$mail->{'headers'}} ), [ 'Content-Type', 'multipart/encrypted; protocol="application/pgp-encrypted"' ] ]; $mail->{'attach'} = [ { 'headers' => [ [ 'Content-Transfer-Encoding', '7bit' ], [ 'Content-Type', 'application/pgp-encrypted'] ], 'data' => "Version: 1\n" }, { 'headers' => [ [ 'Content-Transfer-Encoding', '7bit' ], [ 'Content-Type', 'application/octet-stream' ] ], 'data' => $crypted } ]; } # Check for text-only email local $textonly = $userconfig{'no_mime'} && !$quoted_printable && @{$mail->{'attach'}} == 1 && $mail->{'attach'}->[0] eq $bodyattach; if ($in{'draft'}) { # Save in the drafts folder ($dfolder) = grep { $_->{'drafts'} } @folders; &lock_folder($dfolder); if ($in{'enew'} && $folder eq $dfolder) { # Update existing draft mail @oldmail = &mailbox_list_mails($in{'idx'}, $in{'idx'}, $dfolder); $oldmail = $oldmail[$in{'idx'}]; &mailbox_modify_mail($oldmail, $mail, $dfolder, $textonly); } else { # Save as a new draft &write_mail_folder($mail, $dfolder, $textonly); } &unlock_folder($dfolder); } else { # Send it off and optionally save in sent mail &send_mail($mail, undef, $textonly, $config{'no_crlf'}); if ($userconfig{'save_sent'}) { local ($sfolder) = grep { $_->{'sent'} } @folders; &lock_folder($sfolder); &write_mail_folder($mail, $sfolder, $textonly) if ($sfolder); &unlock_folder($sfolder); } } # Tell the user that email as sent &header($text{'send_title'}, ""); print "
\n"; @tos = ( split(/,/, $in{'to'}), split(/,/, $in{'cc'}), split(/,/, $in{'bcc'}) ); $tos = join(" , ", map { "".&html_escape($_)."" } @tos); print "

",&text($in{'draft'} ? 'send_draft' : 'send_ok', $tos),"

\n"; print "


\n"; if ($in{'idx'} ne '') { &footer("view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}$subs", $text{'view_return'}, "index.cgi?folder=$in{'folder'}", $text{'mail_return'}); } else { &footer("index.cgi?folder=$in{'folder'}", $text{'mail_return'}); } # write_attachment(&attach) sub write_attachment { local ($a) = @_; local ($enc, $rv); foreach $h (@{$a->{'headers'}}) { $rv .= $h->[0].": ".$h->[1]."\r\n"; $enc = $h->[1] if (lc($h->[0]) eq 'content-transfer-encoding'); } $rv .= "\r\n"; if (lc($enc) eq 'base64') { local $encoded = &encode_base64($a->{'data'}); $encoded =~ s/\r//g; $encoded =~ s/\n/\r\n/g; $rv .= $encoded; } else { $a->{'data'} =~ s/\r//g; $a->{'data'} =~ s/\n/\r\n/g; $rv .= $a->{'data'}; if ($a->{'data'} !~ /\n$/) { $rv .= "\r\n"; } } return $rv; } sub test_max_attach { $attachsize += $_[0]; if ($config{'max_attach'} && $attachsize > $config{'max_attach'}) { &error(&text('send_eattachsize', $config{'max_attach'})); } } # expand_to(list) # Given a string containing multiple email addresses and group names, # expand out the group names (if any) # XXX must handle ALL email address formats, to avoid corruption # XXX strip out my address when doing reply-to-all sub expand_to { %address_groups = map { $_->[0], $_->[1] } &list_address_groups() if (!defined(%address_groups)); local @addrs = &split_addresses($_[0]); local (@alladdrs, $a, $expanded); foreach $a (@addrs) { if (defined($address_groups{$a->[0]})) { push(@alladdrs, &split_addresses($address_groups{$a->[0]})); $expanded++; } else { push(@alladdrs, $a); } } return $expanded ? join(", ", map { $_->[2] } @alladdrs) : $_[0]; } mailbox/ulang/0040775000567100000120000000000010032203243013272 5ustar jcameronwheelmailbox/ulang/en0100664000567100000120000001110510026751547013634 0ustar jcameronwheelmail_title=Read Mail mail_none=There are no messages in folder $1 mail_pos=Messages $1 to $2 of $3 in folder $4 mail_return=mailbox send_efile=Attached file $1 is not readable or does not exist address_chooser=Select Address.. address_addr=Email address address_name=Real name address_none=Your address book is empty. address_title=Address Book address_desc=The table below lists addresses that you can select from when composing a new email. Addresses can also be added by clicking on them when viewing an email message. address_edit=Edit.. address_delete=Delete address_add=Add new address entry. address_err=Failed to save address address_eaddr=Missing or invalid email address address_from=From address? address_yd=Yes, default address_gdesc=This section lists groups of addresses that you can define for sending email to several people at once. address_gadd=Add a new group entry. address_gnone=Your group list is empty. address_group=Group address_members=Email addresses address_m=$1 members group_err=Failed to save address group group_egroup=Missing or invalid group name group_emembers=No member email addresses entered folders_title=Manage Folders folders_desc=Each of the folders listed below can contain mail that you move into it, or mail that is placed into it automatically. There are four kinds of folders :
  • System folders like Inbox, Drafts and Sent Mail that always exist
  • Folders under the $1 directory that can be created or deleted by Usermin
  • Other files or directories that can be managed as folders by Usermin
  • POP3 accounts on other servers that can be treated as folders
folders_name=Folder name folders_path=Location folders_type=Type folders_size=Size folders_maildir=Directory folders_mbox=File folders_mhdir=MH directory folders_create=Create a new folder folders_add=Add an existing file or directory as a folder folders_return=folders list folders_serv=$1 on server $2 folders_servp=$1 on server $2 port $3 folders_padd=Add a POP3 account as a folder folders_iadd=Add an IMAP mailbox as a folder edit_title1=Create Folder edit_title2=Edit Folder edit_header=Mail folder details edit_mode=Folder type edit_mode0=File under $1 edit_mode1=External mail file edit_mode2=Sent mail file edit_name=Folder name edit_type=Storage type edit_type0=Single file (mbox) edit_type1=Qmail mail directory (Maildir) edit_type3=MH directory (MH) edit_file=External mail file or directory edit_sent=Sent mail file or directory edit_sent1=Usermin default edit_sent0=External mail file or directory edit_perpage=Messages to display per page edit_sentview=Show To: address instead of From: ? edit_pop3=POP3 account edit_imap=IMAP mailbox edit_server=POP3 server edit_port=Port number edit_iserver=IMAP server edit_user=Username on server edit_pass=Password on server edit_mailbox=IMAP mailbox edit_imapinbox=User's inbox edit_imapother=Other mailbox edit_fromaddr=From: address for messages sent from folder save_err=Failed to save folder save_ecannot=You are not allowed to use this type of folder save_ename=Missing or invalid folder name save_esys=Folder name clashes with one of the system folders save_eclash=A folder with the same name already exists save_embox='$1' does not appear to be a valid mailbox file save_emaildir='$1' does not appear to be a valid Qmail or MH mail directory save_efile='$1' does not exist or is not accessible save_eindir=External mail files cannot be under the folders directory $1 save_title=Delete Folder save_rusure=Are you sure you want to delete the folder $1 in $2? $3 kB of email will be deleted forever. save_delete=Delete Now save_eserver=Missing or invalid POP3 server save_euser=Missing username save_elogin=Failed to login to POP3 server : $1 save_elogin2=Failed to login to IMAP server : $1 save_eperpage=Missing or invalid number of messages per page save_eport=Missing or invalid port number save_efromaddr=Missing or invalid From: address save_emailbox=Failed to open IMAP mailbox : $1 save_emailbox2=Missing or invalid IMAP mailbox save_edelete=Failed to delete mail : $1 save_eappend=Failed to add mail to IMAP mailbox : $1 save_esearch=Failed to search IMAP mailbox : $1 razor_title=Reporting To Razor razor_report=Reporting this message to Razor and other SpamAssassin spam-blocking databases .. razor_done=.. done razor_err=.. failed! See the error message above for the reason why. black_title=Denying Sender black_done=Added the email address $1 to SpamAssassin's denied addresses list. black_already=The email address $1 is already on SpamAssassin's denied addresses list. epop3lock_tries=Failed to lock mail file $1 after trying for $2 minutes, due to a POP3 lock file. mailbox/ulang/fr0100744000567100000120000001647707777077316013677 0ustar jcameronwheelsend_efile=Le fichier attach $1 ne peut tre lu ou n'existe pas view_gnupg=vrification signature GnuPG view_gnupg_0=La signature par $1 est invalide. view_gnupg_1=La signature par $1 est valide, mais la chaine de confiance n'a pu etre tablie. view_gnupg_2=LA signature par $1 n'est PAS valide. view_gnupg_3=La cl ID $1 n'est pas dans votre liste, aussi la signature n'a pu tre vrifie. view_gnupg_4=Echec de la vrification de la signature : $1 view_crypt=Dcryptage mail GnuPG view_crypt_1=Le message est crypt, mais le support GnuPG n'est pas install. view_crypt_2=Echec du dcryptage dy message : $1 view_crypt_3=Le mail a t dcrypt avec succs. view_recv=Fetch key ID $1 from keyserver. view_folder=Retour boite aux lettres view_detach=Detacher le fichier: view_dir=Vers le fichier ou rpertoire: view_black=Emetteur non autoris view_razor=Report Razor mail_title=Lecture des Mails mail_sign=Signer avec la cl GnuPG: mail_nosign=<Ne pas signer> mail_crypt=GnuPG cryptage pour: mail_nocrypt=<Ne pas dcrypter> mail_samecrypt=<Cls pour les adresses destination> mail_addresses=Grer le carnet adresse mail_none=Il n'y a pas de mail dans le dossier $1 mail_pos=Mails $1 $2 (sur $3) du dossier $4 mail_fchange=Modifier mail_move=Dplacer vers: mail_return=mailbox mail_folders=Grer les dossier mail_err=Une erreur a eu lieu en listant les mails du dossier : $1 mail_loginheader=Login serveur POP3 mail_logindesc=Vous devez entrer un login et mot de passe pour accder aux mails
du dossier Inbox sur le serveur mail $1. mail_loginuser=Nom utilisateur mail_loginpass=Mot de passe mail_loginmailbox=IMAP mailbox mail_login=Login mail_reset=Reset mail_logout=Change POP3 login mail_logout2=Change IMAP login mail_sig=Editer la Signature mail_jump=Saut la page : mail_of=de mail_replyto=Rpondre send_epass=Vous ne pouvez pas signer un message cat votre phrase de passeur passphrase has not be setup yet in the GnuPG module. send_esign=Echec de la signature du message : $1 send_ekey=Ne pas pas trouver de cl pour l'adresse email $1 send_ecrypt=Echec du cryptage du message : $1 send_eword=Mot mal pel $1 send_eword2=Mot mal pel $1 - Corrections possible $2 send_eline=Line $1 : send_espell=Les erreurs d'orthographe suivante ont t trouv dans votre message .. send_draft=Mail $1 sauv dans le dossier Brouillon (drafts). send_eattachsize=L'attachement au mail dpasse la taille maximum autorise de $1 octets address_chooser=Choisir Adresse.. address_addr=Adresse Email address_name=Nom rel address_none=Votre carnet d adresse est vide. address_title=Carnet d adresse address_desc=La table suivante liste les adresses que vous pouvez slectionner comme metteur quand vous composez un nouveau mail. Ces adresses peuvent tre ajoutes en cliquant dessus quand vous consulter un email. address_edit=Editer.. address_delete=Effacer address_add=Ajouter une nouvelle adresse. address_err=Echec de la sauvegarde de l'adresse address_eaddr=Adresse Email manquante ou invalide address_from=Adresse metteur? address_yd=Oui, defaut reply_spell=Vrifier les erreurs d'orthographe? reply_draft=Sauver en Brouillon folder_inbox=Messages reus folder_sent=Messages envoys folder_drafts=Brouillons delete_emnone=Aucun mail dplacer selectionn folders_title=Grer les dossiers folders_desc=Each of the folders listed below can contain mail that you move into it, or mail that is placed into it automatically. There are four kinds of folders :
  • System folders like Inbox, Drafts and Sent Mail that always exist
  • Folders under the $1 directory that can be created or deleted by Usermin
  • Other files or directories that can be managed as folders by Usermin
  • POP3 accounts on other servers that can be treated as folders
folders_name=Folder name folders_path=Location folders_type=Type folders_size=Size folders_maildir=Directory folders_mbox=File folders_mhdir=MH directory folders_create=Create a new folder folders_add=Add an existing file or directory as a folder folders_return=folders list folders_serv=$1 on server $2 folders_padd=Add a POP3 account as a folder folders_iadd=Add an IMAP mailbox as a folder edit_title1=Create Folder edit_title2=Edit Folder edit_header=Mail folder details edit_mode=Folder type edit_mode0=File under $1 edit_mode1=External mail file edit_mode2=Sent mail file edit_name=Folder name edit_type=Storage type edit_type0=Single file (mbox) edit_type1=Qmail mail directory (Maildir) edit_type3=MH directory (MH) edit_file=External mail file or directory edit_sent=Sent mail file or directory edit_sent1=Usermin default edit_sent0=External mail file or directory edit_perpage=Messages to display per page edit_sentview=Show To: address instead of From: ? edit_pop3=POP3 account edit_imap=IMAP mailbox edit_server=POP3 server edit_iserver=IMAP server edit_user=Username on server edit_pass=Password on server edit_mailbox=IMAP mailbox edit_imapinbox=User's inbox edit_imapother=Other mailbox edit_fromaddr=From: address for messages sent from folder save_err=Failed to save folder save_ecannot=You are not allowed to use this type of folder save_ename=Missing or invalid folder name save_esys=Folder name clashes with one of the system folders save_eclash=A folder with the same name already exists save_embox='$1' does not appear to be a valid mailbox file save_emaildir='$1' does not appear to be a valid Qmail or MH mail directory save_efile='$1' does not exist or is not accessible save_eindir=External mail files cannot be under the folders directory $1 save_title=Delete Folder save_rusure=Are you sure you want to delete the folder $1 in $2? $3 kB of email will be deleted forever. save_delete=Delete Now save_eserver=Missing or invalid POP3 server save_euser=Missing username save_elogin=Failed to login to POP3 server : $1 save_elogin2=Failed to login to IMAP server : $1 save_eperpage=Missing or invalid number of messages per page save_efromaddr=Missing or invalid From: address save_emailbox=Failed to open IMAP mailbox : $1 save_emailbox2=Missing or invalid IMAP mailbox save_edelete=Failed to delete mail : $1 save_eappend=Failed to add mail to IMAP mailbox : $1 save_esearch=Failed to search IMAP mailbox : $1 confirm_title=Confirmer la suppression confirm_warn=Etes-vous sur de vouloir supprimer les $1 messages slectionns? confirm_warn2=Compte tenu de la taille et format de votre boite aux lettres, l'opration peut tre longue. Jusqu' ce que la suppression soit complte, aucune autre action ne doit tre entreprise. confirm_warn3=Etes-vous sur de vouloir supprimer le message? confirm_warn4=Jusqu' ce que la suppression soit complte, aucune autre action ne doit tre entreprise. confirm_ok=Effacer maintenant detach_err=Echec du dtachement detach_edir=Fichier ou rpertoire pour sauvegarde non renseign detach_eopen=Echec l'ouverture de $1 : $2 detach_ewrite=Echec l'criture de $1 : $2 detach_title=Detacher Fichier detach_ok=Ecrire l'attachement sur le serveur comme fichier $1 ($2). razor_title=Reporter SpamAssassin razor_report=Reporter ce mail la base de donne anti-spam de SpamAssassin .. razor_done=.. termin razor_err=.. chec! Consultez le message d'erreur ci-dessous pour plus d'info. black_title=Interdire l'metteur black_done=Ajouter l'adresse email $1 la liste des adresses interdites de SpamAssassin. black_already=Cet adresse email $1 est dj dans la liste des adresses interdites de SpamAssassin. mailbox/ulang/nl0100644000567100000120000001124207561615107013644 0ustar jcameronwheelsend_efile=Bijlage file $1 is niet leesbaar of bestaat niet view_gnupg=GnuPG ondertekening verificatie view_gnupg_0=Ondertekening door $1 is geldig. view_gnupg_1=Ondertekening door $1 is geldig, maar er was geen geldige vertrouwensketen. view_gnupg_2=Ontertekening door $1 is ONGELDIG. view_gnupg_3=Key ID $1 is niet in uw lijst, ondertekening kon niet worden geverifieerd. view_gnupg_4=Kon ondertekening niet verifieren: $1 view_crypt=GnuPG mail decodering view_crypt_1=E-mail is gecodeerd, maar GnuPG support is niet geinstalleerd. view_crypt_2=Kon e-mail niet decoderen: $1 view_crypt_3=E-mail is gedecodeerd. view_recv=Ophalen van key ID $1 van keyserver. view_folder=Terug naar mailbox mail_sign=Teken met GnuPG key: mail_nosign=<Teken niet> mail_crypt=GnuPG codering voor: mail_nocrypt=<codeer niet> mail_samecrypt=<Key van To: address> mail_addresses=Beheer adresboek mail_none= Er zijn geen berichten in map $1 mail_pos=Berichten $1 tot $2 van $3 in map $4 mail_fchange=Ga naar mail_move=Verplaats naar: mail_return=mailbox mail_folders=Beheer mappen mail_err=Er is een fout opgetreden tijdens het openen van map : $1 mail_loginheader=POP3 server login mail_logindesc=U moet over een wachtwoord beschikken om de e-mail
in uw inbox op server $1 te lezen. mail_loginuser=Gebruikersnaam mail_loginpass=Wachtwoord mail_login=Login mail_reset=Opnieuw send_epass=U kunt nog geen berichten ondertekenen omdat U nog geen passphrase heeft opgegeven in de GnuPG module. send_esign=Kon e-mail $1 niet ondertekenen send_ekey=Kon geen key vinden voor e-mailadres $1 send_ecrypt=Kon e-mail $1 niet coderen send_eword=Spelfout in woord $1 send_eword2=Spelfout in woord $1 - mogelijke correctie $2 send_eline=In regel $1 : send_espell=De volgende spelfouten zijn gevonden in uw bericht.. send_draft=E-mail aan $1 opgeslagen in concepten map. address_chooser=Kies Adres.. address_addr=E-mail adres address_name=Volledige naam address_none=Uw adresboek is leeg. address_title=Adresboek address_desc=De tabel hieronder bevat e-mailadressen die U kunt gebruiken bij het aanmaken van e-mails. U kunt adressen toevoegen door op het adres te klikken tijdens het lezen van e-mail. address_edit=Bewerk.. address_delete=Verwijder address_add=Voeg nieuw adres toe. address_err=Kon adres niet opslaan address_eaddr=Ontbrekend of ongeldig e-mailadres reply_spell=Spellingscontrole? reply_draft=Bewaar als concept folder_inbox=Inbox folder_sent=Verzonden mail folder_drafts=Concepten delete_emnone=Geen e-mail geselecteerd voor verplaatsen folders_title=Beheer mappen folders_desc=De mappen die hieronder staan afgebeeld kunnen elk e-mail bevatten die u daarin plaatst, of daarin automatisch terecht komt. Er zijn vier soorten mappen:
  • Systeem mappen zoals Inbox, Concepten en Verzonden mail, deze mappen bestaan altijd.
  • Mappen onder de $1 directory die door Usermin gemaakt of verwijderd kunnen worden.
  • Andere files of directories die als mappen beheerd kunnen worden door Usermin
  • POP3 accounts op andere servers die als mappen gezien worden.
folders_name=Naam map folders_path=Locatie folders_type=Type folders_size=Grootte folders_maildir=Directory folders_mbox=File folders_mhdir=MH directory folders_create=Maak een nieuwe map folders_add=Voeg een bestaande file of directory toe als folder folders_return=mappenlijst folders_serv=$1 op server $2 folders_padd=Voeg een POP3 account als folder edit_title1=Nieuwe Map edit_title2=Bewerk Map edit_header=E-mail map details edit_mode=Map type edit_mode0=Bewaar in $1 edit_mode1=Externe mail file edit_mode2=Verzonden mail file edit_name=Mapnaam edit_type=Opslag type edit_type0=Enkele file (mbox) edit_type1=Qmail mail directory (Maildir) edit_type3=MH directory (MH) edit_file=Externe mail file or directory edit_sent=Verzonden mail file of directory edit_sent1=Usermin default edit_sent0=Externe mail file of directory edit_pop3=POP3 account edit_server=POP3 server edit_user=Gebruikersnaam op server edit_pass=Wachtwoord op server save_err=Kon map niet opslaan save_ename=Ontbrekende of ongeldige mapnaam save_esys=Mapnaam conflicteert met een van de systeem mappen save_eclash=Een map met deze naam bestaat reeds save_embox='$1' is niet in een leesbaar mailbox formaat save_emaildir='$1' is niet in een leesbaar Qmail of MH mail directoryformaat save_efile='$1' Bestaat niet, of is onleesbaar save_eindir=Externe mail files kunnen niet onder de mappen directory $1 staan save_title=Verwijder Map save_rusure= Wilt U map $1 in $2 verwijderen? $3 kB aan e-mail zal voorgoed worden verwijderd. save_delete=Verwijder Nu save_eserver=Onbekende of ongeldige POP3 server save_euser=Onbekende gebruikersnaam save_elogin= Kon niet inloggen op POP3 server : $1 mailbox/ulang/de0100644000567100000120000002531710006026344013616 0ustar jcameronwheeladdress_add=Einen neuen Adressbucheintrag hinzufügen. address_addr=E-Mail-Adresse address_chooser=Adresse auswählen address_delete=Löschen address_desc=Die unten stehende Tabelle listet die Adressen auf, die Sie auswählen können, wenn Sie eine neue E-Mail schreiben. Adressen können auch durch Anklicken einer Adresse beim Betrachten einer E-Mail zum Adressbuch hinzugefügt werden. address_eaddr=Fehlende oder ungültige E-Mail-Adresse address_edit=Bearbeiten ... address_err=Fehler beim Speichern der Adresse address_from=From:-Addresse? address_gadd=Einen neuen Gruppeneintrag hinzufügen address_gdesc=Diese Auswahl listet Gruppen von Adressen auf, die Sie für den gleichzeitigen Versand an mehrere E-Mail-Empfänger definieren können. address_gnone=Ihre Gruppenliste ist leer. address_group=Gruppe address_m=$1 Mitglieder address_members=E-Mail-Adressen address_name=Real- oder Spitzname address_none=Ihr Adressbuch ist leer. address_title=Adressbuch address_yd=Ja, standardmäßig black_already=Die E-Mail-Adresse $1 befindet sich bereits in der von SpamAssassin gesperrten Adressen. black_done=Die E-Mail-Adresse $1 wurde der Liste der durch SpamAssassin gesperrten Adressen hinzugefügt. black_title=Absender sperren confirm_ok=Jetzt löschen confirm_title=Löschen bestätigen confirm_warn2=Aufgrund der Größe und der Art Ihrer E-Mailbox wird dies ein wenig dauern. In der Zwischenzeit sollten keine anderen Aktionen stattfinden. confirm_warn3=Sind Sie sicher, daß Sie diese E-Mail löschen wollen? confirm_warn4=Solange der Löschvorgang läuft, sollten keine anderen Aktionen stattfinden. confirm_warnall=Sind Sie sicher, daß Sie alle Nachrichten in diesem Ordner löschen wollen? confirm_warn=Sind Sie sicher, daß Sie die $1 ausgewählten E-Mails löschen wollen? delete_emnone=Es wurde keine E-Mail zum Verschieben ausgewählt detach_edir=Es wurde weder eine Datei noch ein Verzeichnis für den Speichervorgang angegeben. detach_eopen=Fehler beim Öffnen von $1 : $2 detach_err=Konnte von der Datei nichts abhängen (Original: Failed to detach file) detach_ewrite=Fehler beim Schreiben von $1 : $2 detach_ok=Anhang wurde in eine Serverseitige Datei geschrieben. $1 ($2). detach_title=Datei beschneiden edit_file=Externe E-Maildatei oder Verzeichnis edit_fromaddr=From:-Adresse für E-Mails, die aus dem Verzeichnis gesendet werden. edit_header=E-Mailverzeichnis-Eigenschaften edit_imap=IMAP-E-Mailbox edit_imapinbox=Posteingang des Benutzers edit_imapother=Andere E-Mailbox edit_iserver=IMAP-Server edit_mailbox=IMAP-E-Mailbox edit_mode0=Datei in $1 edit_mode1=Externe E-Maildatei edit_mode2=Datei für "Gesendete Nachrichten" edit_mode=Verzeichnistyp edit_name=Verzeichnisname edit_pass=Passwort auf dem Server edit_perpage=Anzahl der E-Mails, die pro Seite angezeigt werden edit_pop3=POP3-Account edit_sent0=Externe E-Maildatei oder Verzeichnis edit_sent1=Usermin-Standard edit_sent=Datei oder Verzeichnis für "Gesendete Nachrichten" edit_sentview=Zeige To:-Adressen anstelle der From:-Adressen ? edit_server=POP3-Server edit_title1=Verzeichnis erstellen edit_title2=Verzeichnis bearbeiten edit_type0=Einzelne Datei (mbox) edit_type1=Qmail-E-Mailverzeichnis (E-Maildir) edit_type3=MH-Verzeichnis (MH) edit_type=Speichertyp edit_user=Benutzername auf dem Server epop3lock_tries=Konnte die E-Mail-Speicherdatei $1 nach entsprechenden Versuchen in den letzten $2 Minuten nicht sperren, da eine POP3-Sperrdatei vorlag. folder_drafts=Entwürfe folder_inbox=Posteingang folders_add=Eine existierende Datei oder Verzeichnis als Ordner hinzufügen folders_create=Neues Verzeichnis erstellen folders_desc=Jede der unten aufgelisteten Verzeichnis kann E-Mails enthalten, die Sie manuell verschoben haben, oder die über eine Regel bereits automatisch dorthin verschoben wurde. Es gibt vier Arten von Verzeichnissen:
  • System-Verzeichnisse wie "Posteingang", "Entwürfe" oder "Gesendete Nachrichten", die immer existieren und bei Löschung automatisch neu erstellt werden.
  • Verzeichnisse unterhalb dem $1 Verzeichnis, welche von Usermin erstellt oder gelöscht werden können.
  • Andere Dateien oder Verzeichnisse, welche von Usermin wie Verzeichnisse behandelt werden können.
  • POP3-Accounts auf anderen Servern, die von Usermin als Verzeichnisse behandelt werden können.
  • folder_sent=Gesendete Nachrichten folders_iadd=Eine IMAP-E-Mailbox as Verzeichnis hinzufügen folders_maildir=Verzeichnis folders_mbox=Datei folders_mhdir=MH-Verzeichnis folders_name=Verzeichnisname folders_padd=Einen POP3-Account als Verzeichnis hinzufügen folders_path=Standort folders_return=Verzeichnisliste folders_serv=$1 auf Server $2 folders_size=Größe folders_title=Verzeichnisse verwalten folders_type=Typ folder_trash=Mülleimer group_egroup=Fehlender oder ungültiger Gruppenname group_emembers=Es wurden keine Mitglieds-E-Mail-Adressen eingegeben group_err=Konnte die E-Mail-Gruppe nicht speichern mail_addresses=Adressbuch verwalten mail_advanced=Erweiterte Sucheinstellungen mail_crypt=GnuPG verschlüsselt für: mail_delall=Alles löschen mail_deltrash=Mülleimer leeren mail_err=Eine Fehler ist beim Listen dieses Verzeichnisses aufgetreten : $1 mail_fchange=Ändern mail_folder=Ordner mail_folders=Verzeichnisse verwalten mail_jump=Springe zu Seite : mail_logindesc=Sie müssen Benutzernamen und Passwort angeben,
    Ihren Posteingang auf $1 einzusehen. mail_loginheader=POP3-Server-Login mail_login=Login mail_loginmailbox=IMAP-E-Mailbox mail_loginpass=Passwort mail_loginuser=Benutzername mail_logout2=IMAP-Login ändern mail_logout=POP3-Login ändern mail_move=Verschieben nach: mail_nocrypt=<Nicht verschlüsseln> mail_none=Es gibt keine E-Mails im Verzeichnis $1 mail_nosign=<Nicht signieren> mail_of=von mail_pos=E-Mail $1 bis $2 von $3 im Ordner $4 mail_replyto=Antworten an mail_reset=Löschen mail_return=E-Mailbox mail_samecrypt=<Schlüssel der Zieladresse(n)> mail_search2=Suchen nach: mail_sign=Mit dem GnuPG-Schlüssel signieren: mail_sig=Signatur bearbeiten mail_title=E-Mail lesen razor_done=.. fertig razor_err=.. Fehler! Beachten Sie obige Fehlermeldung. razor_report=Diese E-Mail wird der Spam-Datenbank von SpamAssassin gemeldet. razor_title=An SpamAssassin melden reply_draft=Als Entwurf speichern reply_spell=Auf Schreibfehler prüfen? save_delete=Jetzt löschen save_eappend=Konnte diese E-Mail(s) nicht der IMAP-E-Mailbox zustellen : $1 save_ecannot=Sie dürfen die Art der Verzeichnisse nicht benutzen. save_eclash=Ein anderes Verzeichnis mit dem gleichen Namen existiert bereits. save_edelete=Konnte die E-Mail nicht löschen : $1 save_efile='$1' existiert nicht oder ist nicht erreichbar save_efromaddr=Fehlende oder ungültige From:-Adresse save_eindir=Externe E-Maildateien können nicht unter dem Verzeichnis $1 liegen. save_elogin2=Konnte nicht in den IMAP-Server einloggen : $1 save_elogin=Konnte nicht in den POP3-Server einloggen : $1 save_emailbox2=Fehlende oder ungültige IMAP-E-Mailbox save_emailbox=Konnte IMAP-E-Mailbox nicht öffnen : $1 save_emaildir='$1' scheint kein gültiges Qmail- oder MH-Verzeichnis zu sein save_embox='$1' scheint keine gültige E-Mailboxdatei zu sein save_ename=Fehlender oder ungültiger Verzeichnisname save_eperpage=Fehlende oder ungültige Anzahl von anzuzeigenden E-Mails pro Seite save_err=Konnte Verzeichnis nicht speichern save_esearch=Fehler beim Suchen der IMAP-E-Mailbox : $1 save_eserver=Fehlender oder ungültiger POP3-Server save_esys=Der Verzeichnisname ist mit einem Systemverzeichnisnamen identisch oder ähnlich und wird zurückgewiesen. save_euser=Fehlender Benutzername save_rusure=Sind Sie sicher, daß Sie das Verzeichnis $1 in $2 löschen wollen? $3 KiB an E-Mails werden für immer gelöscht. save_title=Verzeichnis löschen send_draft=E-Mail an $1 wurde im Verzeichnis "Entwürfe" gespeichert. send_eattachsize=Die Größe des Anhanges überschreitet die voreingestellte maximale Größe für E-Mailanhänge send_ecrypt=Konnte E-Mail nicht entschlüsseln : $1 send_efile=Die anghängte Datei $1 ist nicht lesbar oder existiert nicht. send_ekey=Konnte den GnuPG/PGP-Schlüssel für die E-Mail-Adresse $1 nicht finden send_eline=In Zeile $1 : send_epass=Sie können keine Nachrichten signieren, da Sie keine Passphrase im GnuPG-Modul hinterlegt haben. send_esign=Konnte E-Mail nicht signieren : $1 send_espell=Die folgenden Rechtschreibefehler wurden in Ihrer E-Mail gefunden ... send_eword2=Falsch geschriebenes Wort $1 - Mögliche Korrekturvorschläge $2 send_eword=Falsch geschriebenes Wort $1 sform_all=<Alle Ordner> sform_and=Finde Nachrichten, die alle unten aufgeführten Bedingungen erfüllen ... sform_body=Nachrichtentext sform_cc=Cc: Headerzeile sform_date=Datum: Headerzeile sform_folder=in Ordner(n) sform_from=Von: Headerzeile sform_headers=any header sform_local=<Lokale Ordner> sform_neg0=beinhaltet sform_neg1=beinhaltet nicht sform_ok=Jetzt suchen sform_or=Finde Nachrichten, die irgendeine der unten aufgeführten Bedingungen erfüllen ... sform_return=Suchformular Erweiterte Suche sform_size=Nachrichtengröße sform_subject=Betreff: Headerzeile sform_text=den Text sform_title=Erweiterte Suche sform_to=An: Headerzeile sform_where=Wo view_black=Absender blockieren view_crypt_1=Die E-Mail ist verschlüsselt, aber GnuPG-Unterstützung ist nicht installiert. view_crypt_2=Konnte E-Mail nicht entschlüsseln : $1 view_crypt_3=E-Mail wurde erfolgreich entschlüsselt. view_crypt=GnuPG E-Mail-Entschlüsselung view_detach=Anhang entfernen: view_diagnostic-code=Grund des Fehlers view_dir=in eine Serverdatei oder ein Verzeichnis: view_dstatus=Konnte Versandstatus nicht ermitteln view_final-recipient=Endgültiger Empfänger view_folder=Zurück zur E-Mailbox view_gnupg_0=Die GnuPG/PGP-Signatur von $1 ist gültig. view_gnupg_1=Die GnuPG/PGP-Signatur von $1 ist gültig, aber es konnte keine Vertrauensstellung abgefragt werden. view_gnupg_2=Die GnuPG/PGP-Signatur von $1 ist NICHT gültig. view_gnupg_3=Die Schlüssel-ID $1 befindet sich nicht in Ihrem Schlüsselbund, weswegen die GnuPG/PGP-Signatur nicht geprüft werden kann. view_gnupg_4=Konnte GnuPG/PGP-Signatur nicht überprüfen : $1 view_gnupg=GnuPG/PGP-Signatur-Überprüfung view_razor=An Razor melden view_recv=Hole Schlüssel-ID $1 vom Schlüsselserver. view_remote-mta=Entfernter E-Mail-Server view_reporting-mta=Berichtender E-Mail-Server mailbox/ulang/el0100755000567100000120000001465707671622220013647 0ustar jcameronwheelsend_efile= $1 view_gnupg= GnuPG view_gnupg_0= $1 . view_gnupg_1= $1 , trust chain. view_gnupg_2= $1 . view_gnupg_3= Key ID $1 . view_gnupg_4= : $1 view_crypt= GnuPG view_crypt_1=Message is encrypted, but GnuPG support is not installed. view_crypt_2= : $1 view_crypt_3= . view_recv= key ID $1 keyserver. view_folder= mail_sign= GnuPG : mail_nosign=< > mail_crypt= GnuPG : mail_nocrypt=< > mail_samecrypt=< > mail_addresses= mail_none= $1 mail_pos= $1 $2 $3 $4 mail_fchange= mail_move= : mail_return= mail_folders= mail_err= : $1 mail_loginheader= POP3 mail_logindesc=
    $1. mail_loginuser= mail_loginpass= mail_loginmailbox= IMAP mail_login= mail_reset= mail_logout= POP3 mail_logout2= IMAP send_epass= GnuPG. send_esign= : $1 send_ekey= $1 send_ecrypt= : $1 send_eword= $1 send_eword2= $1 - $2 send_eline= $1 : send_espell= .. send_draft= $1 . address_chooser= .. address_addr= address_name= address_none= . address_title= address_desc= . , . address_edit=.. address_delete= address_add= . address_err= address_eaddr= address_from= ; reply_spell= ; reply_draft= folder_inbox= folder_sent= folder_drafts= delete_emnone= folders_title= folders_desc= , . :
    • ,
    • $1 Usermin
    • Usermin
    • POP3
    folders_name= folders_path= folders_type= folders_size= folders_maildir= folders_mbox= folders_mhdir= MH folders_create= folders_add= folders_return= folders_serv=$1 $2 folders_padd= POP3 folders_iadd= IMAP edit_title1= edit_title2= edit_header= edit_mode= edit_mode0= $1 edit_mode1= edit_mode2= edit_name= edit_type= edit_type0= (mbox) edit_type1= Qmail (Maildir) edit_type3= MH (MH) edit_file= edit_sent= edit_sent1= Usermin edit_sent0= edit_perpage= edit_pop3= POP3 edit_imap= IMAP edit_server= POP3 edit_iserver= IMAP edit_user= edit_pass= edit_mailbox= IMAP edit_imapinbox= edit_imapother= save_err= save_ename= save_esys= save_eclash= save_embox='$1' save_emaildir='$1' Qmail MH save_efile='$1' save_eindir= $1 save_title= save_rusure= $1 $2; $3 kB . save_delete= save_eserver= POP3 save_euser= save_elogin= POP3 : $1 save_elogin2= IMAP : $1 save_eperpage= save_emailbox= IMAP : $1 save_emailbox2= IMAP save_edelete= : $1 save_eappend= IMAP : $1 save_esearch= IMAP : $1 confirm_title= confirm_warn= $1 ; confirm_warn2= . , . confirm_warn3= ; confirm_ok= mailbox/ulang/en.old0100664000567100000120000002066410026751271014415 0ustar jcameronwheelview_gnupg=GnuPG signature verification view_gnupg_0=Signature by $1 is valid. view_gnupg_1=Signature by $1 is valid, but trust chain could not be established. view_gnupg_2=Signature by $1 is NOT valid. view_gnupg_3=Key ID $1 is not in your list, so signature could not be verified. view_gnupg_4=Failed to verify signature : $1 view_crypt=GnuPG mail decryption view_crypt_1=Message is encrypted, but GnuPG support is not installed. view_crypt_2=Failed to decrypt message : $1 view_crypt_3=Mail was successfully decrypted. view_recv=Fetch key ID $1 from keyserver. view_folder=Return to mailbox view_detach=Detach file: view_dall=<All files> view_dir=to server file or directory: view_black=Deny Sender view_razor=Report to Razor view_dstatus=Failed delivery status view_final-recipient=Final recipient view_diagnostic-code=Reason for failure view_remote-mta=Remote mail server view_reporting-mta=Reporting mail server view_astext=View as text view_ashtml=View as HTML view_mark=Mark as: view_raw=View raw message mail_title=Read Mail mail_sign=Sign with GnuPG key: mail_nosign=<Don't sign> mail_crypt=GnuPG encrypt for: mail_nocrypt=<Don't encrypt> mail_samecrypt=<Keys from destination addresses> mail_addresses=Manage Address Book mail_none=There are no messages in folder $1 mail_pos=Messages $1 to $2 of $3 in folder $4 mail_fchange=Change mail_move=Move to: mail_return=mailbox mail_folders=Manage Folders mail_err=An error occurred listing mail in this folder : $1 mail_loginheader=POP3 server login mail_logindesc=You must enter a username and password to access mail
    in your inbox on the mail server $1. mail_loginuser=Username mail_loginpass=Password mail_loginmailbox=IMAP mailbox mail_login=Login mail_reset=Clear mail_logout=Change POP3 login mail_logout2=Change IMAP login mail_sig=Edit Signature mail_jump=Jump to page : mail_of=of mail_replyto=Reply to mail_folder=Folder mail_delall=Delete All mail_deltrash=Empty Trash send_efile=Attached file $1 is not readable or does not exist send_epass=You cannot sign a message because your passphrase has not be setup yet in the GnuPG module. send_esign=Failed to sign message : $1 send_ekey=Couldn't find key for email address $1 send_ecrypt=Failed to encrypt message : $1 send_eword=Misspelt word $1 send_eword2=Misspelt word $1 - possible corrections $2 send_eline=In line $1 : send_espell=The following spelling errors were found in your message .. send_draft=Mail to $1 saved in drafts folder. send_eattachsize=The mail attachment exceeded the maximum allowed size of $1 bytes address_chooser=Select Address.. address_addr=Email address address_name=Real name address_none=Your address book is empty. address_title=Address Book address_desc=The table below lists addresses that you can select from when composing a new email. Addresses can also be added by clicking on them when viewing an email message. address_edit=Edit.. address_delete=Delete address_add=Add new address entry. address_err=Failed to save address address_eaddr=Missing or invalid email address address_from=From address? address_yd=Yes, default address_gdesc=This section lists groups of addresses that you can define for sending email to several people at once. address_gadd=Add a new group entry. address_gnone=Your group list is empty. address_group=Group address_members=Email addresses address_m=$1 members group_err=Failed to save address group group_egroup=Missing or invalid group name group_emembers=No member email addresses entered reply_spell=Check for spelling errors? reply_draft=Save as Draft folder_inbox=Inbox folder_sent=Sent mail folder_drafts=Drafts folder_trash=Trash delete_emnone=No mail selected to move folders_title=Manage Folders folders_desc=Each of the folders listed below can contain mail that you move into it, or mail that is placed into it automatically. There are four kinds of folders :
    • System folders like Inbox, Drafts and Sent Mail that always exist
    • Folders under the $1 directory that can be created or deleted by Usermin
    • Other files or directories that can be managed as folders by Usermin
    • POP3 accounts on other servers that can be treated as folders
    folders_name=Folder name folders_path=Location folders_type=Type folders_size=Size folders_maildir=Directory folders_mbox=File folders_mhdir=MH directory folders_create=Create a new folder folders_add=Add an existing file or directory as a folder folders_return=folders list folders_serv=$1 on server $2 folders_servp=$1 on server $2 port $3 folders_padd=Add a POP3 account as a folder folders_iadd=Add an IMAP mailbox as a folder edit_title1=Create Folder edit_title2=Edit Folder edit_header=Mail folder details edit_mode=Folder type edit_mode0=File under $1 edit_mode1=External mail file edit_mode2=Sent mail file edit_name=Folder name edit_type=Storage type edit_type0=Single file (mbox) edit_type1=Qmail mail directory (Maildir) edit_type3=MH directory (MH) edit_file=External mail file or directory edit_sent=Sent mail file or directory edit_sent1=Usermin default edit_sent0=External mail file or directory edit_perpage=Messages to display per page edit_sentview=Show To: address instead of From: ? edit_pop3=POP3 account edit_imap=IMAP mailbox edit_server=POP3 server edit_port=Port number edit_iserver=IMAP server edit_user=Username on server edit_pass=Password on server edit_mailbox=IMAP mailbox edit_imapinbox=User's inbox edit_imapother=Other mailbox edit_fromaddr=From: address for messages sent from folder save_err=Failed to save folder save_ecannot=You are not allowed to use this type of folder save_ename=Missing or invalid folder name save_esys=Folder name clashes with one of the system folders save_eclash=A folder with the same name already exists save_embox='$1' does not appear to be a valid mailbox file save_emaildir='$1' does not appear to be a valid Qmail or MH mail directory save_efile='$1' does not exist or is not accessible save_eindir=External mail files cannot be under the folders directory $1 save_title=Delete Folder save_rusure=Are you sure you want to delete the folder $1 in $2? $3 kB of email will be deleted forever. save_delete=Delete Now save_eserver=Missing or invalid POP3 server save_euser=Missing username save_elogin=Failed to login to POP3 server : $1 save_elogin2=Failed to login to IMAP server : $1 save_eperpage=Missing or invalid number of messages per page save_eport=Missing or invalid port number save_efromaddr=Missing or invalid From: address save_emailbox=Failed to open IMAP mailbox : $1 save_emailbox2=Missing or invalid IMAP mailbox save_edelete=Failed to delete mail : $1 save_eappend=Failed to add mail to IMAP mailbox : $1 save_esearch=Failed to search IMAP mailbox : $1 confirm_title=Confirm Delete confirm_warn=Are you sure you want to delete the $1 selected messages? confirm_warn2=Because of the size and format of your mailbox, this may take some time. Until the deletion has finished, no other action should be performed. confirm_warn3=Are you sure you want to delete this message? confirm_warn4=Until the deletion has finished, no other action should be performed. confirm_ok=Delete Now confirm_warnall=Are you sure you want to delete all of the messages in this folder? detach_err=Failed to detach file detach_edir=No file or directory to save to entered detach_eopen=Failed to open $1 : $2 detach_ewrite=Failed to write to $1 : $2 detach_title=Detach File detach_ok=Wrote attachment to server-side file $1 ($2). razor_title=Reporting To Razor razor_report=Reporting this message to Razor and other SpamAssassin spam-blocking databases .. razor_done=.. done razor_err=.. failed! See the error message above for the reason why. black_title=Denying Sender black_done=Added the email address $1 to SpamAssassin's denied addresses list. black_already=The email address $1 is already on SpamAssassin's denied addresses list. mail_search2=Search for: mail_advanced=Advanced Search sform_title=Advanced Search sform_and=Find messages matching all criteria below .. sform_or=Find messages matches any criteria below .. sform_neg0=contains sform_neg1=doesn't contain sform_ok=Search Now sform_folder=in folder(s) sform_all=<All folders> sform_local=<Local folders> sform_where=Where sform_text=the text sform_from=From: header sform_subject=Subject: header sform_to=To: header sform_cc=Cc: header sform_date=Date: header sform_body=message body sform_headers=any header sform_size=message size sform_return=advanced search form epop3lock_tries=Failed to lock mail file $1 after trying for $2 minutes, due to a POP3 lock file. mailbox/mail_search.cgi0100775000567100000120000001331310026475726015144 0ustar jcameronwheel#!/usr/local/bin/perl # mail_search.cgi # Find mail messages matching some pattern require './mailbox-lib.pl'; &ReadParse(); if ($in{'simple'}) { # Make sure a search was entered $in{'search'} || &error($text{'search_ematch'}); } else { # Validate search fields for($i=0; defined($in{"field_$i"}); $i++) { if ($in{"field_$i"}) { $in{"what_$i"} || &error(&text('search_ewhat', $i+1)); $neg = $in{"neg_$i"} ? "!" : ""; push(@fields, [ $neg.$in{"field_$i"}, $in{"what_$i"} ]); } } @fields || &error($text{'search_enone'}); } $module_index_link = "/$module_name/index.cgi?folder=$in{'folder'}"; &header($text{'search_title'}, ""); @folders = &list_folders(); if ($in{'folder'} == -2) { print "
    $text{'search_local'}
    \n"; } elsif ($in{'folder'} == -1) { print "
    $text{'search_all'}
    \n"; } else { $folder = $folders[$in{'folder'}]; print "
    ", &text('mail_for', $folder->{'name'}),"
    \n"; } print "
    \n"; if ($in{'simple'}) { # Just search by Subject and From in one folder ($mode, $words) = &parse_boolean($in{'search'}); if ($mode == 0) { # Can just do a single 'or' search @searchlist = map { ( [ 'subject', $_ ], [ 'from', $_ ] ) } @$words; @rv = &mailbox_search_mail(\@searchlist, 0, $folder); } elsif ($mode == 1) { # Need to do two 'and' searches and combine @searchlist1 = map { ( [ 'subject', $_ ] ) } @$words; @rv1 = &mailbox_search_mail(\@searchlist1, 1, $folder); @searchlist2 = map { ( [ 'from', $_ ] ) } @$words; @rv2 = &mailbox_search_mail(\@searchlist2, 1, $folder); @rv = @rv1; %gotidx = map { $_->{'idx'}, 1 } @rv; foreach $mail (@rv2) { push(@rv, $mail) if (!$gotidx{$mail->{'idx'}}); } } else { &error($text{'search_eboolean'}); } foreach $mail (@rv) { $mail->{'folder'} = $folder; } print "

    ",&text('search_results2', scalar(@rv), "$in{'search'}"),"

    \n"; } else { # Complex search, perhaps over multiple folders! if ($in{'folder'} == -2) { @sfolders = grep { !$_->{'remote'} } @folders; $multi_folder = 1; } elsif ($in{'folder'} == -1) { @sfolders = @folders; $multi_folder = 1; } else { @sfolders = ( $folder ); } foreach $sf (@sfolders) { local @frv = &mailbox_search_mail(\@fields, $in{'and'}, $sf); foreach $mail (@frv) { $mail->{'folder'} = $sf; } push(@rv, @frv); } print "

    ",&text('search_results4', scalar(@rv)),"

    \n"; } @rv = reverse(@rv); $showto = $folder->{'sent'} || $folder->{'drafts'}; if (@rv) { print "

    \n"; print "\n"; if ($userconfig{'top_buttons'}) { if (!$multi_folder) { print "  \n"; print "  \n"; print &movecopy_select(1, \@folders, $folder) if (@folders > 1); print "

    \n"; print "$text{'mail_all'} \n"; print "$text{'mail_invert'} 
    \n"; } } print "\n"; print " ", $multi_folder ? "" : " ", $showto ? " " : " ", " ", " ", "\n"; } foreach $m (@rv) { local $idx = $m->{'idx'}; local $mf = $m->{'folder'}; print "\n"; if ($multi_folder) { print "\n"; } else { print "\n"; } print "\n"; print "\n"; print "\n"; print "\n"; } if (@rv) { print "
    $text{'mail_folder'} $text{'mail_to'}$text{'mail_from'}$text{'mail_date'}$text{'mail_size'}$text{'mail_subject'}
    $mf->{'name'}", &simplify_from($m->{'header'}->{$showto?'to':'from'}),"",&simplify_date($m->{'header'}->{'date'}),"",int($m->{'size'}/1000)+1," kB","", "
    ",&simplify_subject($m->{'header'}->{'subject'}), " "; if ($m->{'header'}->{'content-type'} =~ /multipart\/\S+/i) { print ""; } local $p = int($m->{'header'}->{'x-priority'}); if ($p == 1) { print " "; } elsif ($p == 2) { print " "; } print "
    \n"; if (!$multi_folder) { print "$text{'mail_all'} \n"; print "$text{'mail_invert'} 

    \n"; print "  \n"; print "  \n"; print &movecopy_select(2, \@folders, $folder) if (@folders > 1); } print "

    \n"; } else { print "$text{'search_none'}

    \n"; } print "


    \n"; &footer($in{'simple'} ? ( ) : ( "search_form.cgi?folder=$in{'folder'}", $text{'sform_return'} ), "index.cgi?folder=$in{'folder'}", $text{'mail_return'}); &pop3_logout_all(); mailbox/uconfig.info0100664000567100000120000000355710033256344014515 0ustar jcameronwheelline0=User interface,11 perpage=Mail messages to display per page,0,5 wrap_width=Width to wrap mail messages at,0,5 top_buttons=Show buttons at top for,1,2-Mailboxes and mails,1-Mailboxes only,0-Never arrows=Show pager arrows at bottom for,1,2-Mailboxes and mails,1-Mailboxes only,0-Never show_to=Show To: address in mailboxes?,1,1-Yes,0-No auto_mark=Automatically mark read messages?,1,1-Yes,0-No thumbnails=Show image attachments as thumbnails
    (Requires cjpeg, djpeg and PNM library commands),1,1-Yes,0-No refresh=Seconds between automatic mailbox refreshes,3,Don't refresh view_html=Show message body as,4,0-Always plain text,1-Text if possible, HTML otherwise,2-HTML if possible, text otherwise,3-Convert HTML to plain text line1=Sending email,11 no_mime=Send text-only messages when possible?,1,1-Yes,0-No save_sent=Save sent mail?,1,1-Yes,0-No real_name=Include real name in From: address?,1,1-Yes,0-No charset=Character set for sent mail,0,15 sig_file=Signature file,10,*-None,.signature-~/.signature,Other file self_crypt=Encrypt email with your secret key too?,1,1-Yes,0-No fwd_mode=Forward messages with quoting?,1,0-Yes,1-No from_in_to=Show From: addresses when selecting a To: address?,1,1-Yes,0-No sort_addrs=Sort address book by,1,0-Order added,1-Real name,2-Email address reply_to=Reply-to: address,10,x-None,*-Choose when sending,Address.. line3=Mail folders,11 mailbox_dir=Mailboxes directory under home directory,0,30 mailbox_recur=Treat mailbox subdirectories as,1,1-Folders,0-Subdirectories default_folder=Default folder file,3,Inbox delete_warn=Ask for confirmation before deleting?,10,y-Yes,n-No,For mbox files larger than delete_mode=When deleting mail,1,0-Just delete from mail file,1-Move to Trash folder folder_sort=Folder sort mode,4,0-Builtin, then ~/mail, then external,1-Builtin, then rest sorted by name,2-All sorted by name mailbox/save_address.cgi0100775000567100000120000000131207653063472015337 0ustar jcameronwheel#!/usr/local/bin/perl # save_address.cgi # Save, add or delete an address book entry require './mailbox-lib.pl'; &ReadParse(); if ($in{'delete'} ne '') { &delete_address($in{'delete'}); } else { &error_setup($text{'address_err'}); $in{'addr'} =~ /^\S+$/ || &error($text{'address_eaddr'}); if ($in{'from'} == 2) { # Turn off default for all others foreach $a (&list_addresses()) { if ($a->[3] == 2 && $a->[2] != $in{'edit'}) { &modify_address($a->[2], $a->[0], $a->[1], 1); } } } if ($in{'add'}) { &create_address($in{'addr'}, $in{'name'}, $in{'from'}); } else { &modify_address($in{'edit'}, $in{'addr'}, $in{'name'}, $in{'from'}); } } &redirect("list_addresses.cgi"); mailbox/add_address.cgi0100775000567100000120000000051007510532726015123 0ustar jcameronwheel#!/usr/local/bin/perl # add_address.cgi # Add an address from an email to the user's address book require './mailbox-lib.pl'; &ReadParse(); &create_address($in{'addr'}, $in{'name'}); @sub = split(/\0/, $in{'sub'}); $subs = join("", map { "&sub=$_" } @sub); &redirect("view_mail.cgi?idx=$in{'idx'}&folder=$in{'folder'}$subs"); mailbox/address_chooser.cgi0100775000567100000120000000640510016250605016032 0ustar jcameronwheel#!/usr/local/bin/perl # address_chooser.cgi # Display a list of entries from the address book # XXX fix up ifield problem require './mailbox-lib.pl'; &ReadParse(); &PrintHeader(); print < $text{'address_choose'} EOF @addrs = &list_addresses(); if ($in{'mode'}) { @addrs = grep { $_->[3] } @addrs; $addrs_count = scalar(@addrs); } else { if (!$uconfig{'from_in_to'}) { @addrs = grep { !$_->[3] } @addrs; } $addrs_count = scalar(@addrs); foreach $a (&list_address_groups()) { push(@addrs, [ $a->[0] ]); $mems{$a->[0]} = [ &split_addresses($a->[1]) ]; } } if (@addrs) { local @sp = &split_addresses(&decode_mimewords($in{'addr'})); for($i=0; $i<@sp; $i++) { $infield{$sp[$i]->[0]} = $i; } print "
    \n"; print "\n"; print "\n" if (!$in{'mode'}); print "\n"; print "\n"; $i = 0; foreach $a (@addrs) { if ($i == $addrs_count && $i) { print "\n"; print "\n"; print "\n"; } print "\n"; if ($in{'mode'} == 0) { printf "\n"; local $m = @{$mems{$a->[0]}}; print "\n"; } else { print "\n"; print "\n"; } print "\n"; $i++; } print "

    $text{'address_addr'}$text{'address_name'}

    $text{'address_group'}$text{'address_members'}
    ", &html_escape($a->[1]), &html_escape($a->[0]), &html_escape($a->[1]), defined($infield{$a->[0]}) ? "checked" : ""; $href = ""; } else { $href = ""; } if ($i >= $addrs_count) { print "$href",$a->[0],"$href",&text('address_m', $m),"$href$a->[0]$href",($a->[1] ? $a->[1] : "
    "),"
    \n"; } else { print "$text{'address_none'}

    \n"; } print "\n"; mailbox/list_addresses.cgi0100775000567100000120000001130407754104757015712 0ustar jcameronwheel#!/usr/local/bin/perl # list_addresses.cgi # Display contents of the user's address book require './mailbox-lib.pl'; &ReadParse(); &header($text{'address_title'}, ""); print "


    \n"; @addrs = &list_addresses(); print "$text{'address_desc'}

    \n"; if (@addrs || $in{'add'}) { if ($in{'add'} || $in{'edit'} ne '') { print "

    \n"; print "\n"; print "\n"; } print "\n"; print " ", " ", " ", $config{'edit_from'} ? " " : "", "\n"; foreach $a (@addrs) { next if (!defined($a->[2])); print "\n"; if ($in{'edit'} eq $a->[2]) { print "\n"; print "\n"; if ($config{'edit_from'}) { &from_sel($a->[3]); } else { print "\n"; } print "\n"; } else { print "\n"; print "\n"; print "\n" if ($config{'edit_from'}); } print "\n"; } if ($in{'add'}) { print "\n"; print "\n"; print "\n"; print &from_sel() if ($config{'edit_from'}); print "\n"; print "\n"; } print "
    $text{'address_addr'}$text{'address_name'}$text{'address_from'}
    \n"; if ($in{'edit'} ne $a->[2]) { print "", "$text{'address_edit'}\n"; } print " \n"; print "", "$text{'address_delete'}$a->[0]",$a->[1] ? $a->[1] : "
    ","
    ",$a->[3] == 1 ? $text{'yes'} : $a->[3] == 2 ? $text{'address_yd'} : $text{'no'},"

    \n"; if ($in{'add'} || $in{'edit'} ne '') { print "
    \n"; } } else { print "$text{'address_none'}

    \n"; } print "$text{'address_add'}
    \n" if (!$in{'add'}); print "


    \n"; print "\n"; @gaddrs = &list_address_groups(); print "$text{'address_gdesc'}

    \n"; if (@gaddrs || $in{'gadd'}) { if ($in{'gadd'} || $in{'gedit'} ne '') { print "

    \n"; print "\n"; print "\n"; } print "\n"; print " ", " ", " ", "\n"; foreach $a (@gaddrs) { next if (!defined($a->[2])); print "\n"; if ($in{'gedit'} eq $a->[2]) { print "\n"; print "\n"; } else { print "\n"; print "\n"; } print "\n"; } if ($in{'gadd'}) { print "\n"; print "\n"; print "\n"; print "\n"; } print "
    $text{'address_group'}$text{'address_members'}
    \n"; if ($in{'gedit'} ne $a->[2]) { print "", "$text{'address_edit'}\n"; } print " \n"; print "", "$text{'address_delete'} ", &address_button("members", 0, 0, 0, 1),"\n"; print "$a->[0]",&html_escape($a->[1]),"
    ", &address_button("members", 0, 0, 0, 1),"\n"; print "

    \n"; if ($in{'gadd'} || $in{'gedit'} ne '') { print "
    \n"; } } else { print "$text{'address_gnone'}

    \n"; } print "$text{'address_gadd'}
    \n" if (!$in{'gadd'}); print "


    \n"; &footer("", $text{'mail_return'}); sub from_sel { print "\n"; } mailbox/defaultuconfig0100664000567100000120000000043310033256374015121 0ustar jcameronwheelperpage=20 wrap_width=80 top_buttons=1 show_to=0 no_mime=0 save_sent=1 mailbox_dir=mail auto_mark=1 thumbnails=0 sort_addrs=1 real_name=1 mailbox_recur=0 charset=iso-8859-1 delete_warn=y sig_file=* self_crypt=1 fwd_mode=0 from_in_to=1 reply_to=x delete_mode=0 folder_sort=1 arrows=0 mailbox/edit_pop3.cgi0100775000567100000120000000405610011533016014544 0ustar jcameronwheel#!/usr/local/bin/perl # edit_pop3.cgi # Display a form for creating or editing a POP3 folder require './mailbox-lib.pl'; &ReadParse(); if ($in{'new'}) { &header($text{'edit_title1'}, ""); $mode = $in{'mode'}; } else { &header($text{'edit_title2'}, ""); @folders = &list_folders(); $folder = $folders[$in{'idx'}]; $mode = $folder->{'mode'}; } print "
    \n"; print "
    \n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
    $text{'edit_header'}
    \n"; print "\n"; print "\n"; print "\n"; printf "\n", $folder->{'name'}; print "\n"; printf "\n", $folder->{'server'}; print "\n", $folder->{'port'}; print "\n"; printf "\n", $folder->{'user'}; print "\n"; printf "\n", $folder->{'pass'}; &show_folder_options($folder); print "
    $text{'edit_mode'}$text{'edit_pop3'}
    $text{'edit_name'}
    $text{'edit_server'}
    $text{'edit_port'} \n"; printf " %s (%d)\n", $folder->{'port'} ? "" : "checked", $text{'default'}, $pop3_port; printf "\n", $folder->{'port'} ? "checked" : ""; printf "
    $text{'edit_user'}
    $text{'edit_pass'}
    \n"; if ($in{'new'}) { print "\n"; } else { print "\n"; print "\n"; } print "
    \n"; print "
    \n"; &footer("list_folders.cgi", $text{'folders_return'}); mailbox/list_folders.cgi0100775000567100000120000000470110026515475015363 0ustar jcameronwheel#!/usr/local/bin/perl # list_folders.cgi # Display a list of all folders and allows additional and deletion require './mailbox-lib.pl'; &header($text{'folders_title'}, ""); print "
    \n"; @folders = &list_folders_sorted(); print &text('folders_desc', $folders_dir),"

    \n"; print "\n"; print " ", " ", " ", "\n"; foreach $f (@folders) { print "\n"; if ($f->{'inbox'} || $f->{'drafts'}) { # Inbox or drafs folder which cannot be edited print "\n"; } elsif ($f->{'type'} == 2) { # Link for editing POP3 folder print "\n"; } elsif ($f->{'type'} == 4) { # Link for editing IMAP folder print "\n"; } elsif ($f->{'mode'} == 2 && !$folder_types{'ext'}) { # Sent mail folder can only be changed if external folders # are allowed print "\n"; } else { # Link for editing local or external folder print "\n"; } if ($f->{'type'} == 2 || $f->{'type'} == 4) { print "\n"; print "\n"; print "\n"; } else { local $mf = &folder_file($f); print "\n"; print "\n"; print "\n"; } print "\n"; } print "
    $text{'folders_name'}$text{'folders_path'}$text{'folders_type'}$text{'folders_size'}
    $f->{'name'}", "$f->{'name'}", "$f->{'name'}$f->{'name'}", "$f->{'name'}",&text( $f->{'port'} ? 'folders_servp' : 'folders_serv', "$f->{'user'}", "$f->{'server'}", "$f->{'port'}"),"",$f->{'type'} == 2 ? "POP3" : "IMAP","
    $mf",$f->{'type'} == 1 ? $text{'folders_maildir'} : $f->{'type'} == 3 ? $text{'folders_mhdir'} : $text{'folders_mbox'},"",&nice_size(&folder_size($f)),"
    \n"; if ($folder_types{'local'}) { print "$text{'folders_create'}\n"; print " " x 3; } if ($folder_types{'ext'}) { print "$text{'folders_add'}\n"; } print "
    \n"; if ($folder_types{'pop3'}) { print "$text{'folders_padd'}\n"; print " " x 3; } if ($folder_types{'imap'}) { print "$text{'folders_iadd'}\n"; } print "
    \n"; print "


    \n"; &footer("", $text{'index'}); mailbox/save_pop3.cgi0100775000567100000120000000327710011533700014561 0ustar jcameronwheel#!/usr/local/bin/perl # save_pop3.cgi # Create, modify or delete a POP3 folder require './mailbox-lib.pl'; &ReadParse(); @folders = &list_folders(); $folder = $folders[$in{'idx'}] if (!$in{'new'}); &error_setup($text{'save_err'}); $folder_types{'pop3'} || &error($text{'save_ecannot'}); if ($in{'delete'}) { # Just delete this folder and cache unlink("$user_module_config_directory/$folder->{'id'}.pop3"); system("rm -rf $user_module_config_directory/$folder->{'id'}.cache"); } else { # Validate inputs $in{'name'} =~ /\S/ || &error($text{'save_ename'}); gethostbyname($in{'server'}) || &check_ipaddress($in{'server'}) || &error($text{'save_eserver'}); $in{'port_def'} || $in{'port'} =~ /^\d+$/ || &error($text{'save_eport'}); $in{'user'} =~ /\S/ || &error($text{'save_euser'}); $in{'perpage_def'} || $in{'perpage'} =~ /^\d+$/ || &error($text{'save_eperpage'}); $in{'fromaddr_def'} || $in{'fromaddr'} =~ /\S/ || &error($text{'save_efromaddr'}); # Save the folder $pop3{'id'} = $folder->{'id'} || time(); $pop3{'name'} = $in{'name'}; $pop3{'server'} = $in{'server'}; $pop3{'port'} = $in{'port_def'} ? undef : $in{'port'}; $pop3{'user'} = $in{'user'}; $pop3{'pass'} = $in{'pass'}; $pop3{'perpage'} = $in{'perpage_def'} ? undef : $in{'perpage'}; $pop3{'fromaddr'} = $in{'fromaddr_def'} ? undef : $in{'fromaddr'}; $pop3{'sent'} = $in{'sent'}; local @err = &pop3_login(\%pop3); if ($err[0] == 0) { &error($err[1]); } elsif ($err[0] == 2) { &error(&text('save_elogin', $err[1])); } else { &pop3_logout($err[1]); } &write_file("$user_module_config_directory/$pop3{'id'}.pop3", \%pop3); chmod(0700, "$user_module_config_directory/$pop3{'id'}.pop3"); } &redirect("list_folders.cgi"); mailbox/uconfig.info.nl0100644000567100000120000000153007561615074015123 0ustar jcameronwheelperpage=Aantal berichten per pagina in lijst,0 wrap_width=Maximale regellengte voor e-mail bericht,0 top_buttons=Toon knoppen bovenaan voor,1,2-Folders en berichten,1-Alleen berichten,0-Nooit show_to=Toon ontvangeradres in folders,1,1-Ja,0-Nee no_mime=Codeer berichten met alleen tekst niet met MIME?,1,1-Ja,0-Nee mailbox_dir=Folder directory onder home directory,0 mailbox_recur=Behandel folder subdirectories als,1,1-Folders,0-Subdirectories save_sent=Bewaar verzonden e-mail?,1,1-Ja,0-Nee auto_mark=Markeer gelezen bericht automatisch?,1,1-Ja,0-Nee default_folder=Standaard folder,3,Inbox thumbnails=Toon bijlage als pasfoto's
    (Vereist cjpeg, djpeg en PNM library commando's),1,1-Ja,0-Nee sort_addrs=Sorteer adresboek op,1,0-Als toegevoegd,1-Persoonsnaam,2-E-mailadres real_name=Toon persoonsnaam in afzenderadres?,1,1-Ja,0-Nee mailbox/edit_folder.cgi0100775000567100000120000000551007732011673015152 0ustar jcameronwheel#!/usr/local/bin/perl # edit_folder.cgi # Display a form for creating or editing a folder of some kind require './mailbox-lib.pl'; &ReadParse(); if ($in{'new'}) { &header($text{'edit_title1'}, ""); $mode = $in{'mode'}; } else { &header($text{'edit_title2'}, ""); @folders = &list_folders(); $folder = $folders[$in{'idx'}]; $mode = $folder->{'mode'}; } print "
    \n"; print "
    \n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
    $text{'edit_header'}
    \n"; print "\n"; print "\n"; if ($mode == 0) { # Adding/editing a new file or directory to ~/mail print "\n"; printf "\n", $folder->{'name'}; print "\n"; if ($in{'new'}) { print "\n"; } else { print "\n"; } } elsif ($mode == 1) { # Adding/editing an external file or directory print "\n"; printf "\n", $folder->{'name'}; print "\n"; printf "\n", $folder->{'file'}, &file_chooser_button("file"); } elsif ($mode == 2) { # Selecting the sent mail folder local $sf = "$folders_dir/sentmail"; print "\n", $folder->{'file'} eq $sf ? "" : $folder->{'file'}, &file_chooser_button("sent"); } &show_folder_options($folder, $mode); print "
    $text{'edit_mode'}",&text("edit_mode$mode", "$folders_dir"),"
    $text{'edit_name'}
    $text{'edit_type'} ", "$text{'edit_type0'}\n"; print " ", "$text{'edit_type1'}\n"; print " ", "$text{'edit_type3'}\n" if ($userconfig{'mailbox_recur'}); print "
    ",$text{'edit_type'.$folder->{'type'}}, "
    $text{'edit_name'}
    $text{'edit_file'} %s
    $text{'edit_sent'} \n"; printf " %s
    \n", $folder->{'file'} eq $sf ? "checked" : "", $text{'edit_sent1'}; printf " %s\n", $folder->{'file'} eq $sf ? "" : "checked", $text{'edit_sent0'}; printf " %s
    \n"; if ($in{'new'}) { print "\n"; } else { print "\n"; print "\n" if ($mode != 2); } print "
    \n"; print "
    \n"; &footer("list_folders.cgi", $text{'folders_return'}); mailbox/inbox_login.cgi0100775000567100000120000000262607623561176015215 0ustar jcameronwheel#!/usr/local/bin/perl # inbox_login.cgi # Save inbox POP3 login and password require './mailbox-lib.pl'; &ReadParse(); @folders = &list_folders(); $folder = $folders[$in{'folder'}]; # Validate inputs &error_setup($text{'mail_loginerr'}); $in{'user'} =~ /\S/ || &error($text{'save_euser'}); $folder->{'user'} = $pop3{'user'} = $in{'user'}; $folder->{'pass'} = $pop3{'pass'} = $in{'pass'}; if ($folder->{'type'} == 2) { # Try POP3 login @err = &pop3_login($folder); if ($err[0] == 0) { &error($err[1]); } elsif ($err[0] == 2) { &error(&text('save_elogin', $err[1])); } else { &pop3_logout($err[1], 1); } # Save inbox .pop3 file &write_file("$user_module_config_directory/inbox.pop3", \%pop3); chmod(0700, "$user_module_config_directory/inbox.pop3"); } else { # Try IMAP login $in{'mailbox_def'} || $in{'mailbox'} =~ /^\S+$/ || &error($text{'save_emailbox2'}); $folder->{'mailbox'} = $pop3{'mailbox'} = $in{'mailbox_def'} ? undef : $in{'mailbox'}; @err = &imap_login($folder); if ($err[0] == 0) { &error($err[1]); } elsif ($err[0] == 2) { &error(&text('save_elogin2', $err[1])); } elsif ($err[0] == 3) { &error(&text('save_emailbox', $err[1])); } else { &imap_logout($err[1], 1); } # Save inbox .imap file &write_file("$user_module_config_directory/inbox.imap", \%pop3); chmod(0700, "$user_module_config_directory/inbox.imap"); } &redirect("index.cgi?folder=$in{'folder'}"); mailbox/save_folder.cgi0100775000567100000120000001333707732012454015167 0ustar jcameronwheel#!/usr/local/bin/perl # save_folder.cgi # Create, modify or delete a folder # XXX check for external clash require './mailbox-lib.pl'; &ReadParse(); @folders = &list_folders(); $old = $folders[$in{'idx'}] if (!$in{'new'}); &error_setup($text{'save_err'}); # Validate inputs if (!$in{'delete'}) { $in{'perpage_def'} || $in{'perpage'} =~ /^\d+$/ || &error($text{'save_eperpage'}); $in{'fromaddr_def'} || $in{'fromaddr'} =~ /\S/ || &error($text{'save_efromaddr'}); } # Can this type of folder be edited? if ($in{'mode'} == 0) { $folder_types{'local'} || &error($text{'save_ecannot'}); } elsif ($in{'mode'} == 1) { $folder_types{'ext'} || &error($text{'save_ecannot'}); } if ($in{'mode'} == 0) { if ($in{'delete'} && $in{'confirm'}) { # Deleting a folder within ~/mail if ($old->{'type'} == 0) { unlink($old->{'file'}); } else { system("rm -rf '$old->{'file'}'"); } delete($userconfig{'perpage_'.$old->{'name'}}); delete($userconfig{'sent_'.$old->{'name'}}); delete($userconfig{'fromaddr_'.$old->{'name'}}); } elsif ($in{'delete'} && !$in{'confirm'}) { # Confirming a delete &header($text{'save_title'}, ""); print "
    \n"; print "
    \n"; print "\n"; print "\n"; print "\n"; if ($old->{'type'} == 0) { @st = stat($old->{'file'}); $sz = int($st[7]/1024); } else { $sz = &disk_usage_kb($old->{'file'}); } print "
    ",&text('save_rusure', $old->{'name'}, "$old->{'file'}", $sz),"

    \n"; print "\n"; print "

    \n"; print "
    \n"; &footer("list_folders.cgi", $text{'folders_return'}); exit; } else { # Creating or renaming a folder within ~/mail $in{'name'} =~ /^\S+$/ || &error($text{'save_ename'}); $in{'name'} ne 'sentmail' && $in{'name'} ne 'drafts' || &error($text{'save_esys'}); $path = "$folders_dir/$in{'name'}"; if ($old->{'name'} ne $in{'name'}) { ($clash) = grep { $_->{'file'} eq $path } @folders; $clash && &error($text{'save_eclash'}); } mkdir($folders_dir, 0700); if ($in{'name'} =~ /\//) { local $pp = $path; $pp =~ s/\/[^\/]+$//; system("mkdir -p '$pp'"); } if ($in{'new'}) { # Create the file or directory if ($in{'type'} == 0) { open(FOLDER, ">>$path"); close(FOLDER); chmod(0700, $path); } elsif ($in{'type'} == 1) { mkdir($path, 0700); mkdir("$path/cur", 0700); mkdir("$path/new", 0700); mkdir("$path/tmp", 0700); } elsif ($in{'type'} == 3) { mkdir($path, 0700); } } elsif ($old->{'name'} ne $in{'name'}) { # Just rename rename($old->{'file'}, $path); } if (!$in{'new'}) { delete($userconfig{'perpage_'.$old->{'name'}}); delete($userconfig{'sent_'.$old->{'name'}}); delete($userconfig{'fromaddr_'.$old->{'name'}}); } $userconfig{'perpage_'.$in{'name'}} = $in{'perpage'} if (!$in{'perpage_def'}); $userconfig{'sent_'.$in{'name'}} = 1 if ($in{'sent'}); $userconfig{'fromaddr_'.$in{'name'}} = $in{'fromaddr'} if (!$in{'fromaddr_def'}); } } elsif ($in{'mode'} == 1) { @mailboxes = split(/\t+/, $userconfig{'mailboxes'}); if ($in{'delete'}) { # Just remove from list of external folders @mailboxes = grep { $_ ne $old->{'file'} } @mailboxes; delete($userconfig{'folder_'.$old->{'file'}}); delete($userconfig{'perpage_'.$old->{'file'}}); delete($userconfig{'sent_'.$old->{'file'}}); delete($userconfig{'fromaddr_'.$old->{'file'}}); } else { # Adding or updating an external folder &verify_external($in{'file'}); if ($in{'file'} ne $old->{'file'}) { ($clash) = grep { $_->{'file'} eq $in{'file'} } @folders; $clash && &error($text{'save_eclash'}); } $in{'name'} || &error($text{'save_ename'}); if ($in{'new'}) { push(@mailboxes, $in{'file'}); } else { delete($userconfig{'folder_'.$old->{'file'}}); delete($userconfig{'perpage_'.$old->{'file'}}); delete($userconfig{'sent_'.$old->{'file'}}); delete($userconfig{'fromaddr_'.$old->{'file'}}); $idx = &indexof($old->{'file'}, @mailboxes); $mailboxes[$idx] = $in{'file'}; } $userconfig{'folder_'.$in{'file'}} = $in{'name'}; $userconfig{'perpage_'.$in{'file'}} = $in{'perpage'} if (!$in{'perpage_def'}); $userconfig{'sent_'.$in{'file'}} = 1 if ($in{'sent'}); $userconfig{'fromaddr_'.$in{'file'}} = $in{'fromaddr'} if (!$in{'fromaddr_def'}); } $userconfig{'mailboxes'} = join("\t", @mailboxes); } elsif ($in{'mode'} == 2) { # Changing the path to the sent mail folder delete($userconfig{'perpage_sent_mail'}); delete($userconfig{'fromaddr_sent_mail'}); if ($in{'sent_def'}) { delete($userconfig{'sent_mail'}); } else { &verify_external($in{'sent'}); $userconfig{'sent_mail'} = $in{'sent'}; $userconfig{'perpage_sent_mail'} = $in{'perpage'} if (!$in{'perpage_def'}); $userconfig{'fromaddr_sent_mail'} = $in{'fromaddr'} if (!$in{'fromaddr_def'}); } } &write_file("$user_module_config_directory/config", \%userconfig); &redirect("list_folders.cgi"); sub verify_external { if (-d $_[0]) { local ($f, %isdir); opendir(DIR, $_[0]); foreach $f (readdir(DIR)) { $isdir{$f}++ if (-d "$_[0]/$f" && $f ne "." && $f ne ".."); } closedir(DIR); if (keys(%isdir)) { $isdir{'cur'} && $isdir{'new'} && $isdir{'tmp'} && keys(%isdir) == 3 || &error(&text('save_emaildir', $_[0])); } } elsif (-r $_[0]) { open(FOLDER, $_[0]); local $line = ; close(FOLDER); !$line || $line =~ /^From\s+(\S+).*\d+/ || &error(&text('save_embox', $_[0])); } else { &error(&text('save_efile', $_[0])); } $_[0] =~ /^\Q$folders_dir\E\// && &error(&text('save_eindir', $folders_dir)); } mailbox/edit_imap.cgi0100775000567100000120000000467710011533725014631 0ustar jcameronwheel#!/usr/local/bin/perl # edit_imap.cgi # Display a form for creating or editing an IMAP folder require './mailbox-lib.pl'; &ReadParse(); if ($in{'new'}) { &header($text{'edit_title1'}, ""); $mode = $in{'mode'}; } else { &header($text{'edit_title2'}, ""); @folders = &list_folders(); $folder = $folders[$in{'idx'}]; $mode = $folder->{'mode'}; } print "
    \n"; print "
    \n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
    $text{'edit_header'}
    \n"; print "\n"; print "\n"; print "\n"; printf "\n", $folder->{'name'}; print "\n"; printf "\n", $folder->{'server'}; print "\n", $folder->{'port'}; print "\n"; printf "\n", $folder->{'user'}; print "\n"; printf "\n", $folder->{'pass'}; print "\n"; printf "\n", $folder->{'mailbox'}; &show_folder_options($folder); print "
    $text{'edit_mode'}$text{'edit_imap'}
    $text{'edit_name'}
    $text{'edit_iserver'}
    $text{'edit_port'} \n"; printf " %s (%d)\n", $folder->{'port'} ? "" : "checked", $text{'default'}, $imap_port; printf "\n", $folder->{'port'} ? "checked" : ""; printf "
    $text{'edit_user'}
    $text{'edit_pass'}
    $text{'edit_mailbox'} %s\n", $folder->{'mailbox'} ? "" : "checked", $text{'edit_imapinbox'}; printf " %s\n", $folder->{'mailbox'} ? "checked" : "", $text{'edit_imapother'}; printf "
    \n"; if ($in{'new'}) { print "\n"; } else { print "\n"; print "\n"; } print "
    \n"; print "
    \n"; &footer("list_folders.cgi", $text{'folders_return'}); mailbox/save_imap.cgi0100775000567100000120000000360510011533714014626 0ustar jcameronwheel#!/usr/local/bin/perl # save_imap.cgi # Create, modify or delete an IMAP folder require './mailbox-lib.pl'; &ReadParse(); @folders = &list_folders(); $folder = $folders[$in{'idx'}] if (!$in{'new'}); &error_setup($text{'save_err'}); $folder_types{'imap'} || &error($text{'save_ecannot'}); if ($in{'delete'}) { # Just delete this folder and cache unlink("$user_module_config_directory/$folder->{'id'}.imap"); system("rm -rf $user_module_config_directory/$folder->{'id'}.cache"); } else { # Validate inputs $in{'name'} =~ /\S/ || &error($text{'save_ename'}); gethostbyname($in{'server'}) || &check_ipaddress($in{'server'}) || &error($text{'save_eserver'}); $in{'port_def'} || $in{'port'} =~ /^\d+$/ || &error($text{'save_eport'}); $in{'user'} =~ /\S/ || &error($text{'save_euser'}); $in{'mailbox_def'} || $in{'mailbox'} =~ /^\S+$/ || &error($text{'save_emailbox2'}); $in{'perpage_def'} || $in{'perpage'} =~ /^\d+$/ || &error($text{'save_eperpage'}); $in{'fromaddr_def'} || $in{'fromaddr'} =~ /\S/ || &error($text{'save_efromaddr'}); # Save the folder $imap{'id'} = $folder->{'id'} || time(); $imap{'name'} = $in{'name'}; $imap{'server'} = $in{'server'}; $imap{'port'} = $in{'port_def'} ? undef : $in{'port'}; $imap{'user'} = $in{'user'}; $imap{'pass'} = $in{'pass'}; $imap{'mailbox'} = $in{'mailbox_def'} ? undef : $in{'mailbox'}; $imap{'perpage'} = $in{'perpage_def'} ? undef : $in{'perpage'}; $imap{'fromaddr'} = $in{'fromaddr_def'} ? undef : $in{'fromaddr'}; local @err = &imap_login(\%imap); if ($err[0] == 0) { &error($err[1]); } elsif ($err[0] == 2) { &error(&text('save_elogin2', $err[1])); } elsif ($err[0] == 3) { &error(&text('save_emailbox', $err[1])); } else { &imap_logout($err[1], 1); } &write_file("$user_module_config_directory/$imap{'id'}.imap", \%imap); chmod(0700, "$user_module_config_directory/$imap{'id'}.imap"); } &redirect("list_folders.cgi"); mailbox/inbox_logout.cgi0100775000567100000120000000057507623560353015413 0ustar jcameronwheel#!/usr/local/bin/perl # inbox_logout.cgi # Clear inbox POP3 login and password require './mailbox-lib.pl'; &ReadParse(); @folders = &list_folders(); $folder = $folders[$in{'folder'}]; if ($folder->{'type'} == 2) { unlink("$user_module_config_directory/inbox.pop3"); } else { unlink("$user_module_config_directory/inbox.imap"); } &redirect("index.cgi?folder=$in{'folder'}"); mailbox/uconfig.info.de0100644000567100000120000000375610006026344015076 0ustar jcameronwheelauto_mark=Gelesene E-Mails automatisch markieren,1,1-Ja,0-Nein charset=Zeichensatz für gesendete E-Mails,0,15 default_folder=Startverzeichnis-Datei,3,Posteingang delete_mode=Wenn eine E-Mail gelöscht wird,1,0-Lösche sie aus der E-Mail-Datei,1-Verschiebe in den Mülleimer delete_warn=Vor dem Löschen rückfragen,10,y-Ja,n-Nein,wenn grösser als folder_sort=Sortierung der Ordner,4,0-Eingebaut, dann ~/mail, dann Externe,1-Eingebaut, dann den Rest sortiert nach Name,2-Alle sortiert nach Name from_in_to=Zeige From:-Adressen bei der Auswahl von To:-Adressen?,1,1-Ja,0-Nein fwd_mode=Markieren (quoten) beim Weiterleiten ?,1,0-Ja,1-Nein line0=Benutzerinterface,11 line1=E-Mail-Versand line3=E-Mail-Verzeichnisse,11 mailbox_dir=E-Mails in diesem Verzeichnis im Home-Verzeichnis,0,30 mailbox_recur=E-Mailboxunterverzeichnisse sind,1,1-Verzeichnisse,0-Unterverzeichnisse no_mime=Keine MIME-Kodierung von Nurtext-Nachrichten?,1,1-Ja,0-Nein perpage=E-Mailnachrichten pro Seite,0,5 real_name=Namen in Absenderadresse angeben ?,1,1-Ja,0-Nein refresh=Sekunden zwischen dem Neulesen der E-Mailbox,3,Nicht automatisch reply_to=Reply-to:-Adresse,10,x-Keine,*-Beim Versand auswählen,Diese Adresse ... save_sent=Gesendete E-Mails speichern,1,1-Ja,0-Nein self_crypt=E-Mail verschlüsseln ?,1,1-Ja,0-Nein show_to=To:-Adresse in E-Mailboxen anzeigen?,1,1-Ja,0-Nein sig_file=Signaturdatei,10,*-Keine,.signature-~/.signature,andere sort_addrs=Adressbuch sortieren nach,1,0-Empfangsdatum,1-Personen Name,2-E-Mailadresse thumbnails=Bildervorschau anzeigen
    (Benötigt cjpeg, djpeg und die PNM-library Kommandos),1,1-Ja,0-Nein top_buttons=Knöpfe oben für,1,2-E-Mailboxen und E-Mails,1-nur E-Mailboxen,0-Nie view_html=Zeige E-Mails an als ,4,0-Immer plain text,1-Text wenn möglich, ansonsten HTML,2-HTML wenn möglich, ansonsten Text wrap_width=Zeilenumbruch bei Spalte,0,5 mailbox/save_sig.cgi0100775000567100000120000000052007674167315014500 0ustar jcameronwheel#!/usr/local/bin/perl # save_sig.cgi # Update the user's signature file require './mailbox-lib.pl'; $sf = &get_signature_file(); $sf || &error($text{'sig_enone'}); &ReadParseMime(); $in{'sig'} =~ s/\r//g; $in{'sig'} =~ s/\n*$/\n/; open(SIG, ">$sf") || &error(&text('sig_eopen', $!)); print SIG $in{'sig'}; close(SIG); &redirect(""); mailbox/edit_sig.cgi0100775000567100000120000000115707674167410014472 0ustar jcameronwheel#!/usr/local/bin/perl # edit_sig.cgi # Display the user's .signature file for editing require './mailbox-lib.pl'; $sf = &get_signature_file(); $sf || &error($text{'sig_enone'}); &header($text{'sig_title'}, ""); print "
    \n"; print &text('sig_desc', "$sf"),"

    \n"; print "

    \n"; print "
    \n"; print "\n"; print "\n"; print "
    \n"; print "
    \n"; &footer("", $text{'mail_return'}); mailbox/config-*-linux0100664000567100000120000000047010035762242014652 0ustar jcameronwheeledit_from=1 mail_system=0 mail_dir=/var/spool/mail perpage=20 wrap_width=80 top_buttons=1 show_to=0 sendmail_path=/usr/lib/sendmail server_attach=1 mail_style=0 mail_file=mbox mail_dir_qmail=Maildir from_map=/etc/mail/generics index_min=1000000 index_dbm=0 folder_types=local,ext,pop3,imap pop_locks=1 no_crlf=0