RE: [Exim] (quite ot) pop3 client for virtual users

Pàgina inicial
Delete this message
Reply to this message
Autor: eltonic40
Data:  
A: sanjay
CC: Exim Mailing List
Assumpte: RE: [Exim] (quite ot) pop3 client for virtual users
Here is what you do:

Get exim up and running first.

Add in this Transport to handle virtual deliveries.

# Deliver virtual domains to their own mail spool
  virtual_localdelivery:
    driver = appendfile
    create_directory = true
    directory_mode = 700
    file = /var/spool/virtual/${domain}/${local_part}
    user = exim
    group = exim
    mode = 660


This transport assumes that the spool directory is owned
by exim! If it isn't then

-> chown exim:exim /etc/virtual will do the trick

If you are not already up and running with exim just let me
know and I will share a script that can effectively get
your system up and running with Exim.

You can test your config with

-> exim -bt [virtualuser@???]

and you should see something like this:

<-- virtualuser@???
<-- virtualuser@???
deliver to virtualuser in domain virtual.domain.com
director = virtual_localuser, transport = virtual_localdelivery

This indicates that exim is properly handling virtual delivery.

With that behind, get a copy of vm-pop3d at

http://www.reedmedia.net/software/virtualmail-pop3d/#download

And as usual do:
tar -zxvf vm-pop3d-1.1.4.tar.gz
cd vm-pop3d-1.1.4

edit vm-pop3d.h setting:

#define VIRTUAL_UID     90 (which also owns the virtual spool - in my case exim)
This allows vm-pop3d to act as exim.


Then do:
./configure --enable-debug && edit config.h

and make this change
/* Define if you have the <security/pam_appl.h> header file. */
/* #undef HAVE_SECURITY_PAM_APPL_H 1 */

This knocks out PAM.

Then do:
make && make install

to make and install the application.

Finally, add this line to inetd.conf
pop stream tcp nowait root /usr/libexec/tcpd /usr/local/sbin/vm-pop3d

Please make sure of the availability of /usr/libexec/tcpd. I had to get mine
at ftp://ftp.cert.org/pub/tools/tcp_wrappers/tcp_wrappers_7.6.tar.gz

Beware of Trojan Horse Versions of this.

The link above should be secure. Please see CERT Notification
http://www.cert.org/advisories/CA-1999-01.html

With Exim delivering and VM-POP3D installed, we are now ready for
deploying virtual domains.

For each virtual domain you would like to host do:

[ note: Make sure that /etc/virtual is owned by Exim]


cd /etc/virtual
mkdir [virtual.domain.com]
touch [virtual.domain.com]/aliases --> contains all address (aliases) for the
domain
touch [virtual.domain.com]/passwd --> contains all password for domain accounts

Your [virtual.domain.com] has been initialized. Next add in user accounts with:

echo [username]:[useraddress] >> [virtual.domain.com]/aliases
for example
-> echo [me]:[me@???]
to make me@??? valid

./authenticate [username] [password] >> [virtual.domain.com]/passwd
for example
-> ./authenticate me mypassword >> virtual.domain.com/passwd
to supply password for the account we just created

To create the script authenticate which generates encrypted passwords just do:

edit authenticate --> and then add the below lines

_______________________________________
#!/usr/bin/perl
# syntax authenticate username password >> file you are publishing to

$name = $ARGV[0];

 @salt_chars         = ('a'..'z','A'..'Z','0'..'9');
 $salt               = $salt_chars[rand(62)] . $salt_chars[rand(62)];


$passwd = crypt ($ARGV[1], $salt);

print "$name:$passwd\n";
_______________________________________

Then chmod 700 authenticate. if you like
ln -s /usr/sbin/authenticate /etc/virtual/authenticate
to make authenticate easily accessible

This script was gotten from
http://www.reedmedia.net/software/virtualmail-pop3d/#passwords

So we have successfully setup Exim to accept & delivery for virtual domains
and now our popper will be able to pick it up. Let's test it.

telnet localhost 110
user me@??? -> the account we just created
[+OK]
pass mypassword -> the password we supplied for that account
[+OK]
stat
[blah blah blah] -> the number of messages we have on the server

So that's it. CONGRATULATIONS! Without needing entries in /etc/passwd,
we have now setup our system to accept mails for multiple domains.

Any more problems, just shout and I will be glad to help you out some
more.



eltonic40
Jesus is Lord Always!
http://eltonic40.freeservers.com

> -----Original Message-----
> From: sanjay [mailto:indianlinuxuser@yahoo.com]
> Sent: Thursday, June 28, 2001 4:49 PM
> To: eltonic40
> Subject: Re: [Exim] (quite ot) pop3 client for virtual users
>
>
> ya, i would like to test this setup atleast.
>
> sanjay
>
>
> ----- Original Message -----
> From: "eltonic40" <eltonic40@???>
> To: "sanjay" <indianlinuxuser@???>
> Sent: Thursday, September 27, 2001 10:33 AM
> Subject: RE: [Exim] (quite ot) pop3 client for virtual users
>
>
> > If you would like such a setup, just whistle and I will help you out!
> >
> > eltonic40
> > Jesus is Lord Always!
> > http://eltonic40.freeservers.com
> >
> > > -----Original Message-----
> > > From: sanjay [mailto:indianlinuxuser@yahoo.com]
> > > Sent: Wednesday, June 27, 2001 10:49 PM
> > > To: eltonic40
> > > Subject: Re: [Exim] (quite ot) pop3 client for virtual users
> > >
> > >
> > > but, from where it gets authenticated?
> > >
> > > sanjay
> > >
> > > ----- Original Message -----
> > > From: "eltonic40" <eltonic40@???>
> > > To: "sanjay" <indianlinuxuser@???>
> > > Sent: Thursday, September 27, 2001 3:16 AM
> > > Subject: RE: [Exim] (quite ot) pop3 client for virtual users
> > >
> > >
> > > > I have successfully setup vmpop3d to work with Exim for just this
> purpose,
> > > > handling virtual domains. vmpop3d does this without needing system
> users
> > > > in your /etc/passwd. I have tried this with Outlook.
> > > >
> > > >
> > > > eltonic40
> > > > Jesus is Lord Always!
> > > > http://eltonic40.freeservers.com
> > > >
> > > > > -----Original Message-----
> > > > > From: exim-users-admin@??? [mailto:exim-users-admin@exim.org]On
> > > > > Behalf Of sanjay
> > > > > Sent: Wednesday, June 27, 2001 10:33 PM
> > > > > To: exim-users@???; ilpalazzo@???
> > > > > Subject: Re: [Exim] (quite ot) pop3 client for virtual users
> > > > >
> > > > >
> > > > > i have used cucipop as pop3 with exim.
> > > > >
> > > > > sanjay
> > > > >
> > > > > ----- Original Message -----
> > > > > From: <ilpalazzo@???>
> > > > > To: <exim-users@???>
> > > > > Sent: Thursday, September 27, 2001 1:57 AM
> > > > > Subject: [Exim] (quite ot) pop3 client for virtual users
> > > > >
> > > > >
> > > > > > I have this config:
> > > > > > - Exim delivers all the mails for local and virtual users
> > > > > > - The virtual user passwd files are located in
> > > /etc/vmail/passwd.$domain
> > > > > > - The virtual mail files are in
> /var/spool/vmail/$domain/$local_part
> > > > > >
> > > > > > What do you believe is the most suitable pop3 client for use with
> exim
> > > and
> > > > > this kind of
> > > > > > config for virtual domains? there's no
> > > > > > performance issue
> > > > > >
> > > > > > Thanks in advance
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ## List details at http://www.exim.org/mailman/listinfo/exim-users
> > > Exim
> > > > > details at http://www.exim.org/ ##
> > > > >
> > > > >
> > > > > _________________________________________________________
> > > > > Do You Yahoo!?
> > > > > Get your free @yahoo.com address at http://mail.yahoo.com
> > > > >
> > > > >
> > > > > --
> > > > > ## List details at http://www.exim.org/mailman/listinfo/exim-users
> > > > > Exim details at http://www.exim.org/ ##
> > > > > ---
> > > > > Incoming mail is certified Virus Free.
> > > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > > Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001
> > > > >
> > > > ---
> > > > Outgoing mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001
> > >
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
> > > ---
> > > Incoming mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001
> > >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.282 / Virus Database: 150 - Release Date: 9/25/2001
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.282 / Virus Database: 150 - Release Date: 9/25/2001