By default, Sendmail is configured to only accept connections from localhost (127.0.0.1). To allow connections from ALL hosts, please do the following:
Note: This will setup Sendmail to allow connections from ALL IP's and all interfaces on the machine.
Install the package with the following option # up2date sendmail-cf
Edit /etc/mail/sendmail.mc and change the following line:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
To look like the following (removing the localhost restrictions):
DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl
Save the file.
Execute the following command to rebuild the Sendmail files: make -C /etc/mail
Restart Sendmail with: service sendmail restart ...
Wednesday, April 2, 2008
How do you setup cyrus for POP3 to work with Sendmail with Red Hat Enterprise Linux 4?
All of the command provided are required to run locally. We recommend that you back-up any files that you will edit, before editing them. For example, us the cp (copy) command to save an instance of the file before you edit:
cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.bak
To begin, first run:
service saslauthd status
service cyrus-imapd status
service sendmail status
To setup cyrus, leave /etc/imapd.conf as default from the RPM package. For /etc/cyrus.conf leave as default except for the following: # UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=5
# imaps cmd="imapd -s" listen="imaps" prefork=1
pop3 cmd="pop3d" listen="pop3" prefork=3
# pop3s cmd="pop3d -s" listen="pop3s" prefork=1
# sieve cmd="timsieved" listen="sieve" prefork=0
# these are only necessary if receiving/exporting usenet via NNTP
# nntp cmd="nntpd" listen="nntp" prefork=3
# nntps cmd="nntpd -s" listen="nntps" prefork=1
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" prefork=1
}
Note: You will need imap even if you are not planning on running an imap server.
Next, set the password for cyrus:
passwd cyrus
Set the saslauthd password: saslpasswd -c cyrus
su to the cyrus user and execute: /usr/lib/cyrus-imapd/mkimap
Add a user with both passwords: useradd testuser
saslpasswd -c testuser
Now restart or start the services and turn them on to start at boot time: service saslauthd restart
service cyrus-imapd restart
service sendmail restart
service xinetd restart
chkconfig saslauthd on
chkconfig cyrus-imapd on
chkconfig sendmail on
You might need to reboot to allow cyrus to take ownership of the port.
Login in as cyrus to cyrus-imap:
cyradm --user cyrus localhost
You can type help for more information. The prompt should also change: localhost.localdomain> help
Now make the users mailbox. Note the "user." must come before the username: localhost.localdomain> cm user.testuser
You can now exit: localhost.localdomain> quit
You can now test the user: telnet localhost 110
the login:
user testuser
pass test
You should see:
+OK Name is a valid mailbox
+OK Mailbox locked and ready
You now have cyrus working correctly. The mail box should show up:
/var/spool/imap/t/user/
You will now need to set Sendmail up to receive mail and send it to cyrus. Edit the configuration file /etc/mail/sendmail.mc and add this line to the bottom: dnl MAILER(smtp)dnl
dnl MAILER(procmail)dnl
define(`confLOCAL_MAILER', `cyrus')
MAILER(`cyrus')
If you want Sendmail to be able to receive mail from other places then itself, change this line from: DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnlto dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnlNext, execute: # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
You will then need to restart Sendmail: service sendmail restart
You can test, by doing: # mail testuser@localhost
Subject: test
test
.
#make sure you put the ?.? at the end of the email.
The mail should show up in: /var/spool/imap/t/user/testuser/ and you should be able to check it with any local POP3 client
cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.bak
To begin, first run:
service saslauthd status
service cyrus-imapd status
service sendmail status
To setup cyrus, leave /etc/imapd.conf as default from the RPM package. For /etc/cyrus.conf leave as default except for the following: # UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=5
# imaps cmd="imapd -s" listen="imaps" prefork=1
pop3 cmd="pop3d" listen="pop3" prefork=3
# pop3s cmd="pop3d -s" listen="pop3s" prefork=1
# sieve cmd="timsieved" listen="sieve" prefork=0
# these are only necessary if receiving/exporting usenet via NNTP
# nntp cmd="nntpd" listen="nntp" prefork=3
# nntps cmd="nntpd -s" listen="nntps" prefork=1
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" prefork=1
}
Note: You will need imap even if you are not planning on running an imap server.
Next, set the password for cyrus:
passwd cyrus
Set the saslauthd password: saslpasswd -c cyrus
su to the cyrus user and execute: /usr/lib/cyrus-imapd/mkimap
Add a user with both passwords: useradd testuser
saslpasswd -c testuser
Now restart or start the services and turn them on to start at boot time: service saslauthd restart
service cyrus-imapd restart
service sendmail restart
service xinetd restart
chkconfig saslauthd on
chkconfig cyrus-imapd on
chkconfig sendmail on
You might need to reboot to allow cyrus to take ownership of the port.
Login in as cyrus to cyrus-imap:
cyradm --user cyrus localhost
You can type help for more information. The prompt should also change: localhost.localdomain> help
Now make the users mailbox. Note the "user." must come before the username: localhost.localdomain> cm user.testuser
You can now exit: localhost.localdomain> quit
You can now test the user: telnet localhost 110
the login:
user testuser
pass test
You should see:
+OK Name is a valid mailbox
+OK Mailbox locked and ready
You now have cyrus working correctly. The mail box should show up:
/var/spool/imap/t/user/
You will now need to set Sendmail up to receive mail and send it to cyrus. Edit the configuration file /etc/mail/sendmail.mc and add this line to the bottom: dnl MAILER(smtp)dnl
dnl MAILER(procmail)dnl
define(`confLOCAL_MAILER', `cyrus')
MAILER(`cyrus')
If you want Sendmail to be able to receive mail from other places then itself, change this line from: DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnlto dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnlNext, execute: # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
You will then need to restart Sendmail: service sendmail restart
You can test, by doing: # mail testuser@localhost
Subject: test
test
.
#make sure you put the ?.? at the end of the email.
The mail should show up in: /var/spool/imap/t/user/testuser/ and you should be able to check it with any local POP3 client
How do I configure Samba to use domain accounts for authentication?
The following is a bare bones smb.conf file that will authenticate users off of a domain controller. Keep in mind that if you wish to apply user/group permissions locally you should create identical user accounts on the linux system. These accounts do not need to have access, and it is advisable to set their shells to /bin/false.
Replace MACHINE with the name you wish your server to be associated with via netbios. Normally this would be identical to your hostname. Replace WORKGROUP with the name of the domain you wish to be a member of.
If the "password server = *" is used, Samba will search for a domain controller to authenticate against. Alternatively you can specify the tcp/ip address(es) of your domain controller(s).
[global]
workgroup = EXAMPLE
netbios name = MACHINE
password server = *
encrypt passwords = Yes
preferred master = No
domain master = No
Replace MACHINE with the name you wish your server to be associated with via netbios. Normally this would be identical to your hostname. Replace WORKGROUP with the name of the domain you wish to be a member of.
If the "password server = *" is used, Samba will search for a domain controller to authenticate against. Alternatively you can specify the tcp/ip address(es) of your domain controller(s).
[global]
workgroup = EXAMPLE
netbios name = MACHINE
password server = *
encrypt passwords = Yes
preferred master = No
domain master = No
Subscribe to:
Posts (Atom)