[rt-users] RT with Qmail HOWTO

Mike Jackson mjj at isorauta.ntc.nokia.com
Fri May 16 08:17:37 EDT 2003


Hi,
 Very many people on the RT Users mailing list seem to have problems
getting Qmail and RT working happily together. It's not difficult at all.

 I just put this together in about 5 minutes. I thought that it would be
nice to make a contribution to the RT user manual. Feel free to add this
text to RTFM. The current Qmail portion is woefully inadequate (no
offense intended to the original author) :-)

 Comments, flames, criticism are all welcome!

--------------------------


RT with Qmail HOWTO
--------------------

The following instructions will work for very small setups, as well
as for setups with a thousand support queues.


Without further adieu, let's proceed.


1. cd /var/qmail/users

2. edit assign

=test:rt:4040:501:/home/rt:-:test:
=test-comment:rt:4040:501:/home/rt:-:test-comment:
=backup-support:rt:4040:501:/home/rt:-:backup-support:
=backup-support-comment:rt:4040:501:/home/rt:-:backup-support-comment:
=db-support:rt:4040:501:/home/rt:-:db-support:
=db-support-comment:rt:4040:501:/home/rt:-:db-support-comment:
=ldap-support:rt:4040:501:/home/rt:-:ldap-support:
=ldap-support-comment:rt:4040:501:/home/rt:-:ldap-support-comment:
.


NOTES:

 In the above example, email addresses are created for 4 RT queues. The
fields are delimited by the : character. The third field is the rt
user's UID, the fourth field is his GID, and the fifth field is his
home directory. Make sure those fields match your local configuration.

 The last line of the assign file must be a single dot.


5. while in the /var/qmail/users directory, execute:

	../bin/qmail-newu

NOTE: you have to repeat step 5 every time you make a change to the assign file


6. add aliases to rt's home directory, 2 per queue, matching the assign file:

bella:root:/home/rt
# ls -al
total 68
drwxr-xr-x    4 rt       rt           4096 May 12 12:17 .
drwxr-xr-x    6 root     root         4096 Mar 31 13:08 ..
-rw-r--r--    1 rt       rt            155 May 12 12:16 .qmail-backup-support
-rw-r--r--    1 rt       rt            152 May 12 12:16 .qmail-backup-support-comment
-rw-r--r--    1 rt       rt            151 May 12 12:14 .qmail-db-support
-rw-r--r--    1 rt       rt            148 May 12 12:15 .qmail-db-support-comment
-rw-r--r--    1 rt       rt            153 May 12 12:17 .qmail-ldap-support
-rw-r--r--    1 rt       rt            150 May 12 12:17 .qmail-ldap-support-comment
-rw-r--r--    1 rt       rt             89 Mar 13 10:06 .qmail-test
-rw-r--r--    1 rt       rt             86 Mar 13 10:06 .qmail-test-comment

bella:root:/home/rt
# cat .qmail-backup-support
| /var/qmail/bin/preline /usr/local/rt2/bin/rt-mailgate --queue backup-support --action correspond

bella:root:/home/rt
# cat .qmail-backup-support-comment 
| /var/qmail/bin/preline /usr/local/rt2/bin/rt-mailgate --queue backup-support --action comment


7. If you created those .qmail files as root, then you need to

	chown rt:rt .qmail-*


8. install the perl-suidperl rpm if you're using linux. If not, then figure it out on your own.


9. configure rt-mailgate to use suid-perl (or qmail will refuse to deliver)

bella:root:/usr/local/rt2/bin
# head -n 2 rt-mailgate 
#!/usr/bin/suidperl -w

## EOF





More information about the rt-users mailing list