A while back I was running mail servers for High Country Rugby and the Georgia Rugby Union. During that time I had reason to use the Teapop mail server but wanted it to work with the Maildir format and with 'htpasswd'. For whatever reason Teapop did not support this out of the box so I patched it to meet my needs. I kept this note on how to create a patch and thought I would share it today.
1. Determined how to force Teapop to use Maildir format with htpasswd:
A. Make patch!
1. cp pop_passwd.c to pop_passwd.c.orig
2. edit pop_passwd.c and add "strcat(pinfo->maildrop, "/"); at line 998(?)
3. Create patch with diff -u pop_passwd.c.orig pop_passwd.c
3.1 Name patch like so: patch-pop_passwd.c_in
patch-[file name]_in
4. place patch file in /usr/ports/mail/teapop/patches/patch-pop_passwd.c_in
5. Execute "sudo make clean" and "sudo make package".
6. Scp package to server.
7. Unzip on server (my servers did not have gcc or other tools installed for security reasons).
8. mv /usr/local/libexec/teapop to /usr/local/libexec/teapop.orig
9. Copy new teapop executable to /usr/local/libexec/teapop
10. Enjoy your patched program!
0 comments:
Post a Comment