User Tools

Site Tools


software:dovecot:archiveserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
software:dovecot:archiveserver [2023/07/28 17:05] rodolicosoftware:dovecot:archiveserver [2023/09/25 14:42] rodolico
Line 25: Line 25:
 ===== Create a user and store for the e-mail ===== ===== Create a user and store for the e-mail =====
  
-We should use a different user/group for this and all mail will be owned by that user/group. Additionally, we don't want a login, so we'll set the shell to /dev/false. We'll also tell the adduser script to not create the home directory (we'll create it ourselves),+We should use a different user/group for this and all mail will be owned by that user/group. Additionally, we don't want a login, so we'll set the shell to /bin/false. We'll also tell the adduser script to not create the home directory (we'll create it ourselves),
  
 Message store (ie, home directory) can be anyplace. I'm going to set it up in /srv/vmail. This will be the head of a tree of subdirectories for individual users. Note, I use useradd (vs Debian's adduser) for simplicity. Message store (ie, home directory) can be anyplace. I'm going to set it up in /srv/vmail. This will be the head of a tree of subdirectories for individual users. Note, I use useradd (vs Debian's adduser) for simplicity.
  
 <code bash> <code bash>
-useradd --home-dir /srv/vmail --gid vmail --no-create-home --shell /dev/false --user-group --comment 'Used for vmail only' vmail+useradd --home-dir /srv/vmail --no-create-home --shell /bin/false --user-group --comment 'Used for vmail only' vmail
 mkdir -p /srv/vmail mkdir -p /srv/vmail
 chmod 755 /srv/vmail chmod 755 /srv/vmail
Line 42: Line 42:
 <code bash> <code bash>
 mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.original mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.original
 +edit /etc/dovecot/dovecot.conf
 </code> </code>
  
Line 192: Line 193:
  
 The script could also be set up to remove MIME attachments and store them. A good place to start on that would be in the article [[http://www.perlmonks.org/bare/?node_id=525036]] where they describe how to pull a MIME attachment out and store it as a file. The script could then replace the MIME attachment code in the e-mail with a link to the extracted file. The script could also be set up to remove MIME attachments and store them. A good place to start on that would be in the article [[http://www.perlmonks.org/bare/?node_id=525036]] where they describe how to pull a MIME attachment out and store it as a file. The script could then replace the MIME attachment code in the e-mail with a link to the extracted file.
 +
 +===== Errors =====
 +
 +Some e-mail, especially older ones or spam, have malformed dates, or dates which can not be processed by the Perl libraries. In this case, you may receive an error similar to
 +<code>
 +Use of uninitialized value $t[4] in addition (+) at ./archiveIMAP line 234, <GEN3> line 720660.
 +</code>
 +and the e-mail in question will **not** be processed. If you find lines like this in your logs, or if you see some older e-mail not being moved, you will need to move manually or delete them.
software/dovecot/archiveserver.txt · Last modified: 2023/09/25 15:19 by rodolico