Init scripts for smtp and pop3 services

2000-04-03 Thread Antonio Navarro Navarro

Hi all !

I have a RedHat Linux box with qmail + vpopmail. The SMTP service is
started using tcpserver, and POP3 is started using inetd. I want to set up
both services to be started/stoped using tcpserver. Where can I find a good
script for doing this ? 

BEGIN OF CONF.SECTION OF FILE : /etc/inetd.conf

pop-3stream  tcp nowait  root/var/qmail/bin/tcp-env tcp-env
/var/qmail/bin/qmail-popup server.bemarnet.es
/var/qmail/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir

END OF CONF.SECTION OF FILE : /etc/inetd.conf

BEGIN OF FILE /etc/rc.d/init.d/qmail

#
# /etc/init.d/qmail : start or stop the qmail mail subsystem.
#
# Written by Christian Hudon 
# fixed by Adam McKenna :p

PATH=$PATH:/usr/bin:/usr/local/bin:/var/qmail/bin:/var/qmail/ezmlm:/var/qmai
l/popusers/bin
USERID=502# CHANGE THIS TO YOUR QMAILD UID!!!
GROUPID=501  # CHANGE THIS TO YOUR NOFILES GID!!!

case "$1" in
start)
echo -n "Starting mail-transfer agent: qmail"
csh -cf '/var/qmail/rc '  /dev/null
supervise /var/lock/qmail-smtpd tcpserver -c 400 -q
-x/etc/tcp.smtp.cdb \
-u$USERID -g$GROUPID 0 25 qmail-smtpd 
echo "."
;;
stop)
echo -n "Stopping mail-transfer agent: qmail"
PID=`ps -eo pid,comm | awk '{ if ($2 == "qmail-send") print $1}'`
killall -TERM qmail-send
svc -dx /var/lock/qmail-smtpd
echo "."
;;
restart)
$0 stop
$0 start
;;
reload|force-reload)
echo "Reloading 'locals' and 'virtualdomains' control files."
#PID=`ps -eo pid,comm | awk '{ if ($2 == "qmail-send") print $1}'`
killall -HUP qmail-send
;;
*)
echo 'Usage: /etc/init.d/qmail {start|stop|restart|reload}'
    exit 1
esac

exit 0

END OF FILE /etc/rc.d/init.d/qmail

Antonio Navarro Navarro
BemarNet Management
http://www.bemarnet.es
[EMAIL PROTECTED]



Spamming control fails with badmailfrom file

2000-03-10 Thread Antonio Navarro Navarro

Hi all !

I have a badmailfrom file for controling spammers, but it doesn't works as
I expected. If someone sends mail with an empty mailfrom (MAIL FROM:),
qmail is unable to check it against the badmailfrom database, even if the
header of the mail contains a From: field.

So I'm looking for one or several patches or add-ons for qmail that allows me:

1.- Reject all mail that contains a 'From: [EMAIL PROTECTED]'  line in
the first n lines of the mail.
2.- Reject all mail that contains an specific text in the subject (For
example HAPPY99.EXE)
2.- Reject all mail that comes from an specific mail server.

Where could I look for this add-ons ?

Regards,

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



Initial scripts for QMail (RedHat 6.1)

2000-02-07 Thread Antonio Navarro Navarro

Hi all !

I have installed the following applications :

 daemontools-0.53+patches-5
 ucspi-tcp-0.84
 MySQL-3.22.27-1
 qmail-etrn-0.1f.diff
 qmail-1.03.tar.gz
 vpopmail-3.4.10

My initial script for launching qmail (/etc/rc.d/init.d/qmail) follows:

#!/bin/sh
#
# /etc/init.d/qmail : start or stop the qmail mail subsystem.
#
# Written by Christian Hudon 
# fixed by Adam McKenna :p

PATH=$PATH:/usr/bin:/usr/local/bin:/var/qmail/bin:/var/qmail/ezmlm:/var/qmail/popusers/bin
USERID=502# CHANGE THIS TO YOUR QMAILD UID!!!
GROUPID=501  # CHANGE THIS TO YOUR NOFILES GID!!!

case "$1" in
start)
echo -n "Starting mail-transfer agent: qmail"
csh -cf '/var/qmail/rc '  /dev/null
supervise /var/lock/qmail-smtpd tcpserver -c 400 -q -x/etc/tcp.smtp.cdb \
-u$USERID -g$GROUPID 0 25 qmail-smtpd 
echo "."
;;
stop)
echo -n "Stopping mail-transfer agent: qmail"
PID=`ps -eo pid,comm | awk '{ if ($2 == "qmail-send") print $1}'`
killall -TERM qmail-send
svc -dx /var/lock/qmail-smtpd
echo "."
;;
restart)
$0 stop
$0 start
;;
reload|force-reload)
echo "Reloading 'locals' and 'virtualdomains' control files."
#PID=`ps -eo pid,comm | awk '{ if ($2 == "qmail-send") print $1}'`
killall -HUP qmail-send
;;
*)
echo 'Usage: /etc/init.d/qmail {start|stop|restart|reload}'
exit 1
esac

exit 0

The inetd.conf line for POP3 service follows :

pop-3stream  tcp nowait  root/var/qmail/bin/tcp-env tcp-env 
/var/qmail/bin/qmail-popup server.bemarnet.es /var/qmail/vpopmail/bin/vchkpw 
/var/qmail/bin/qmail-pop3d Maildir

I have the following problems:

1.- A /etc/rc.d/init.d/qmail stop didn't works fine, so after stopping the service I 
must restartthe machine in order to start the service. I think that the problem is in 
the fact that the POP3 service is launched from inetd. How can I change this in order 
to start/stop both services (POP3 and SMTP) from tcpserver ?

2.- I want to remove the MySQL support for the QMail users using vpopmail (I want to 
use vpopmail but with .db? files for the usernames/passwords), but I don't want to 
lost the users or the mails in the queue. How can I do it ?

Best regards,

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



Last POP3 login date and time

2000-01-13 Thread Antonio Navarro Navarro

Hi all !

How can I obtain the date and time of the last time a user checked his e-mail box ? (I 
use QMail + Vpopmail)

Regards,

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



files in /var/qmail/control

1999-12-24 Thread Antonio Navarro Navarro

Hi all !

What is supposed to contain the /var/qmail/control/locals file ?. Mine contains two 
lines like this:

server.bemarnet.es
server.bemarnet.es

The machine is called dns.bemarnet.es and is managing the mail for the bemarnet.es 
domain (and for several hundred domains with the same IP and the vpopmail package).

I think in this file must be the real name of the machine (dns.bemarnet.es) or the 
default domain (bemarnet.es), am I right ? 

The other files contain the following:

me - dns.bemarnet.es
defaultdomain - bemarnet.es
virtualdomains - other domains like this: domain.com:domain.com
plusdomain - bemarnet.es

(The 'me' file contains dns.bemarnet.es)

If I change this file and only place 'bemarnet.es' (one or two times in different 
lines) the mails sent to [EMAIL PROTECTED] dissapear !!

The maillog file show that the file has been sent to the user, but there is nothing in 
the Maildir.

Regards,

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



Forwarding e-mail for specific users

1999-12-23 Thread Antonio Navarro Navarro

Hi all !

I have configured a QMail server for an specific domain. I want the messages received 
to some of the e-mail addresses of this domain to be forwarded to a secondary mail 
server that has been configured for accepting mail for the same domain.

Example: 

mail sent to [EMAIL PROTECTED] received in smtp.domain.com must be redirected to the 
same username ([EMAIL PROTECTED]) using the server smtp2.domain.com.

Question: What should I do with the qmail control files, dns, etc.. in order to make 
things work in this way ?

Best regards,

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



Adding relay for a domain (II)

1999-12-13 Thread Antonio Navarro Navarro

Hi again !

I have solved the problem. After adding the domain to morercpthosts and executing 
/var/qmail/bin/qmail-newmrh I added the domain to smtproutes and now it works fine.

Regards,

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



ETRN command support

1999-11-17 Thread Antonio Navarro Navarro

Hi All !

It seems that the ETRN command is not implemented in Qmail. How can I force the 
dequeing of messages for a domain ?

Regards,

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



Mail relaying with QMail

1999-11-02 Thread Antonio Navarro Navarro

Hi all !

I have been testing the mail relay cgi from abuse.net 
(http://www.abuse.net/relay.html) and after entering the name of the Qmail server that 
I am testing, one of the tests fails with the following message:

(..xx is the name of the server)

 220 .xxx.xx ESMTP
 HELO www.abuse.net
 250 .xxx.xx


Relay test 1
 RSET
 250 flushed
 MAIL FROM:[EMAIL PROTECTED]
 250 ok
 RCPT TO:[EMAIL PROTECTED]
 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Relay test 2
 RSET
 250 flushed
 MAIL FROM:spamtest
 250 ok
 RCPT TO:[EMAIL PROTECTED]
 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Relay test 3
 RSET
 250 flushed
 MAIL FROM:
 250 ok
 RCPT TO:[EMAIL PROTECTED]
 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Relay test 4
 RSET
 250 flushed
 MAIL FROM:[EMAIL PROTECTED]
 250 ok
 RCPT TO:[EMAIL PROTECTED]
 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Relay test 5
 RSET
 250 flushed
 MAIL FROM:spamtest@[194.179.67.23]
 250 ok
 RCPT TO:[EMAIL PROTECTED]
 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Relay test 6
 RSET
 250 flushed
 MAIL FROM:[EMAIL PROTECTED]
 250 ok
 RCPT TO:[EMAIL PROTECTED]
 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Relay test 7
 RSET
 250 flushed
 MAIL FROM:[EMAIL PROTECTED]
 250 ok
 RCPT TO:relaytest%abuse.net@[194.179.67.23]
 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Relay test 8
 RSET
 250 flushed
 MAIL FROM:[EMAIL PROTECTED]
 250 ok
 RCPT TO:"[EMAIL PROTECTED]"
 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Relay test 9
 RSET
 250 flushed
 MAIL FROM:[EMAIL PROTECTED]
 250 ok
 RCPT TO:"relaytest%abuse.net"
 250 ok

Relay test result
Uh oh, host appeared to accept a message for relay.

How I can patch this error ? It seems that the server accepts relaying !

Regards,

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



QMail an MySQL or similar

1999-11-02 Thread Antonio Navarro Navarro

Hi again !

Thanks for clarifiyng the matter with the abuse.net cgi. Now one more question. Where 
can I found a path for qmail that coul maintain the usernames/passwords in a RDBS like 
Oracle o MySQL compatible with vpopmail (I need several domains in a IP address).

Thanks in advance !

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



QMail aliases with vchkpw (vpopmail)

1999-11-02 Thread Antonio Navarro Navarro

Hello !

How can I add mail aliases to a domain that has been installed using QMail and 
Vpopmail ? I can add and delete domains and users, but I don't know how to manage 
aliases...

Thanks in advance !

Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es



QMail installation

1999-10-14 Thread Antonio Navarro Navarro

Hi all !

I have installed a Linux machine with two 9 Gbytes SCSI disks with RedHat
Linux 6.1. I want to install QMail as the mail serer in this machine, and I
have a couple of questions.

1.- Is possible to maintain a database in MySQL, Oracle or similar with
usernames/passwords and aliases ? I don't want to create a user account in
the Linux machine for each e-mail user.

2.- Wich directories are involved with the mail processing ? I want to make
several aprtitions in the hard disks and want to know where will be stored
the queue files (I suppose that in /var/qmail) the mainboxes of the users
(Maybe /home/user ?), and so on...

3.- From where could I download the latests rpm files for installing the
QMail Server in RH 6.1 ? Wich files do I need ?

Best regards,



Antonio Navarro Navarro
BemarNet Management
[EMAIL PROTECTED]
http://www.bemarnet.es