courier_imaps_server_-_maildir
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
courier_imaps_server_-_maildir [2022/07/19 19:52] – created 85.134.209.200 | courier_imaps_server_-_maildir [2022/07/20 21:48] (current) – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Courier_IMAPS_Server_-_Maildir | + | ===== Courier_IMAPS_Server_-_Maildir ===== |
- | 1. Install Courier | + | 1. Install Courier |
- | | + | < |
+ | | ||
This will pull down all relevant packages | This will pull down all relevant packages | ||
- | Chose defaults when installing | + | Chose defaults when installing. No to web-based administration. Ok to default cert. (see more later) |
+ | </ | ||
2. Main Config is naturly enough in / | 2. Main Config is naturly enough in / | ||
| | ||
3. To get postfix handing off to Courier: | 3. To get postfix handing off to Courier: | ||
+ | < | ||
| | ||
/ | / | ||
- | | + | |
| | ||
+ | </ | ||
4. Step 3 should automatically make a Maildir in /home/user when mail is recieved | 4. Step 3 should automatically make a Maildir in /home/user when mail is recieved | ||
+ | < | ||
If you want to make the maildir manually, because a maildir is required for IMAP Login: | If you want to make the maildir manually, because a maildir is required for IMAP Login: | ||
Done using this website: http:// | Done using this website: http:// | ||
Line 18: | Line 23: | ||
| | ||
This can be done for defauly users in the skeleton account /etc/skel/ | This can be done for defauly users in the skeleton account /etc/skel/ | ||
- | 5. IMAP login and recieving | + | </ |
+ | 5. IMAP login and receiving | ||
+ | <del> | ||
6. Fix for courier. | 6. Fix for courier. | ||
So thunderbird gave me the error: "Alert from account: Filesystem notification initialization error -- contact your mail administrator (check for configuration errors with the FAM/Gamin library). | So thunderbird gave me the error: "Alert from account: Filesystem notification initialization error -- contact your mail administrator (check for configuration errors with the FAM/Gamin library). | ||
Line 25: | Line 32: | ||
Ref: http:// | Ref: http:// | ||
- | <del> | ||
7. Now there does seem to be a load in PROCMAIL that I'm not using. | 7. Now there does seem to be a load in PROCMAIL that I'm not using. | ||
Rules can be made as to what folder to sort incoming email. | Rules can be made as to what folder to sort incoming email. | ||
Line 33: | Line 39: | ||
</ | </ | ||
- | = Install and Config for Procmail = | + | ===== Install and Config for Procmail ===== |
+ | < | ||
| | ||
vi / | vi / | ||
- | < | + | #add the line: |
| | ||
restart postfix and test. | restart postfix and test. | ||
+ | </ | ||
- | ====== Quick config for procmail ====== | + | ==== Quick config for procmail ==== |
+ | < | ||
vi / | vi / | ||
# | # | ||
Line 49: | Line 58: | ||
:0 c | :0 c | ||
| | ||
- | This above procmail | + | </ |
+ | This above procmail | ||
More procmail rules at http:// | More procmail rules at http:// | ||
+ | <del> | ||
===== Update Cert ===== | ===== Update Cert ===== | ||
Even though I'm sure its not the best practice, I copy the newly updated apache.pem cert and use it for courier-ssl. | Even though I'm sure its not the best practice, I copy the newly updated apache.pem cert and use it for courier-ssl. | ||
cp / | cp / | ||
/ | / | ||
+ | </ | ||
+ | |||
+ | ===== Secure IMAPs ===== | ||
+ | Mandate secure imapds | ||
+ | < | ||
+ | vi / | ||
+ | IMAP_TLS_REQUIRED=1 | ||
+ | </ | ||
+ | |||
+ | On installing courier via apt-get it creates a test ssl cert. However its not self-signed. | ||
+ | To create a self-signed cert: | ||
+ | |||
+ | < | ||
+ | cd /root/ | ||
+ | openssl req -x509 -newkey rsa:1024 -keyout | ||
+ | #rename / | ||
+ | #move from /root into / | ||
+ | chown courier / | ||
+ | chmod 600 / | ||
+ | |||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Testing imaps via a client PC and problems ==== | ||
+ | Testing with thunderbird did not go to plan. I normally use thunderbird portable to login and test. | ||
+ | It hung and did not create the account. | ||
+ | In / | ||
+ | |||
+ | After a lot of testing, it turned out it was nothing to do with imapd.pem, but a problem with thunderbird and self-signed certs. Thunderbird did not prompt to allow exception. | ||
+ | |||
+ | Solution 1 - Use Mailbird - it prompted to allow and store exception. | ||
+ | |||
+ | Solution 2 - Fix for Thunderbird for imaps self-signed certs: | ||
+ | < | ||
+ | go to Options > Composition > Addressing | ||
+ | Check Directory server and Edit Directories > Add new | ||
+ | set name to: ' | ||
+ | specify server address: mail.mydomain.com | ||
+ | Base DN: cn=base | ||
+ | Check 'Use secure connection(SSL)' | ||
+ | set port: 993 | ||
+ | Bind DN: cn=user, | ||
+ | Base and Bind DN does not need to exist, cn=user, | ||
+ | Select directory server in the list | ||
+ | Go to Inbox Tab > Address Book | ||
+ | Select fakeLdapDirectory in the list and type something into the search input on top right. If asked for password type anything e.g. ' | ||
+ | You should get ' | ||
+ | |||
+ | </ | ||
+ | |||
+ | Ref: https:// | ||
+ | |||
+ | ===== Final Config ===== | ||
+ | For final additions to postfix with courier and procmail, please see: [[postfix_smtp# |
courier_imaps_server_-_maildir.1658260369.txt.gz · Last modified: 2022/07/19 20:13 (external edit)