Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: qmail vpopmail courier-imap qmail-scanner etc (NEW)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6 ... 23, 24, 25  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 200
Location: Flagstaff, AZ

PostPosted: Thu May 27, 2004 6:27 am    Post subject: Reply with quote

Spoke too soon- my files in /qmail/control are like those shown- except my hostname isn't "mail", it's "enterprise". Anyway, the rest is the same, so defaultdomain isn't misconfigured. Next guess? :)
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
batchicken
n00b
n00b


Joined: 14 Feb 2004
Posts: 3
Location: New Zealand

PostPosted: Thu May 27, 2004 11:41 pm    Post subject: Reply with quote

Great how-to.
Dumb question though. How do I configure the rest of my system, I have looked through a number of howto's and docs and have tired a few things to create mailboxes and get the mail delivered to the corresponding maildirs but to no avail. Can you point me in the right direction - to a doc that explicates the process.

Thanks.
Back to top
View user's profile Send private message
vcihon
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2003
Posts: 107

PostPosted: Fri May 28, 2004 12:44 am    Post subject: Reply with quote

A couple of questions:

1. I know this is probably obvious to most however I can't tell given this setup how to whitelist good users which are marked as spam. Most docs say it is in the /home/user/.spamassain file however that doesn't apply here.

2. The spam is being correctly delivered to a Spam directory in the virtual users mailbox. This is accessible via IMAP but not POP3 (there is no spam folder). How can I make this available to all users?

3. Is there a gui front end, similar to Roaring Penguin's Canit that allows users to manage their spam (mark email as either spam or not effecting Bayes scoring etc.) and the ability to whitelist good email accounts etc?

Thanks as always!
Back to top
View user's profile Send private message
vesik
n00b
n00b


Joined: 16 Sep 2002
Posts: 14

PostPosted: Fri May 28, 2004 10:44 am    Post subject: Reply with quote

For me it looks like /etc/conf/spamd.conf should be /etc/conf/spamd.

Also, I'm running this setup on a hardened box using the hardened-sources with Grsecurity set to "High" and all the "Hardened" patches enabled. This causes clamav to barf with a:

@4000000040b714cc13f060b4 X-Qmail-Scanner-1.16:[minh10857402254265790] clam_scanner: corrupt or unknown ClamAV scanner error or memory/resource/perms problem - exit status 50

or something similar.

What I had to do to remedy the problem was to edit my /var/qmail/control/conf-common and up the SOFTLIMIT_OPTS to around 20000000.
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Fri May 28, 2004 9:20 pm    Post subject: Reply with quote

I'm having a weird issue. The subject and bodies of my e-mail seem to be getting stripped before they reach .maildir. Here's a copy of a new e-mail I just sent to myself in my .maildir/new folder:

Code:
new # cat 1085778979.7304.fw\,S\=323
Return-Path: <cstevens@homestore.com>
Delivered-To: cstevens@pwned.com
Received: (qmail 7302 invoked by uid 204); 28 May 2004 14:16:19 -0700
Received: from cstevens@homestore.com by fw by uid 201 with qmail-scanner-1.16
 (.  Clear:.
 Processed in 1.622812 secs); 28 May 2004 21:16:19 -0000
Received: from unknown (HELO pwned.com) (206.131.160.44)
  by 0 with SMTP; 28 May 2004 14:16:17 -0700


As you can see, there's no subject or body. Any idea what the problem might be? I'm totally not sure where to start looking. ;(

They all show up blank in squirrelmail.
_________________
http://get.a.clue.de
Back to top
View user's profile Send private message
ghost_recon
n00b
n00b


Joined: 09 Aug 2003
Posts: 28

PostPosted: Sat May 29, 2004 11:19 pm    Post subject: Reply with quote

need help when i do this
Code:

emerge /usr/portage/net-mail/qmail-scanner/qmail-scanner-1.16-r2.ebuild

i get this error
Code:

cannot write to /var/spool/qmailscan/qmail-scanner-queue-version.txt - Permissio
n denied at /var/qmail/bin/qmail-scanner-queue.pl line 1193.
perlscanner: generate new DB file from /var/spool/qmailscan/quarantine-attachmen
ts.txt
X-Qmail-Scanner-1.16:[] cannot open for write /var/spool/qmailscan/quarantine-at
tachments.db.tmp - Permission denied


Fixed the above ^ I think I dont see the errors anymore i emerged qmail-scanner-1.20

Now I have a new problem I finished the tutorial. When I use QmailAdmin or SquirrelMail I cant login in on either. Ive tried every combination of user names and passwords for the past 5 hours and still no luck.

I can still send and receive mail using mutt. Which is a pain to ssh into my server every few hours. But at least thats working.


Last edited by ghost_recon on Sun May 30, 2004 3:37 pm; edited 2 times in total
Back to top
View user's profile Send private message
lorano
n00b
n00b


Joined: 27 Sep 2003
Posts: 66

PostPosted: Sun May 30, 2004 3:30 pm    Post subject: Reply with quote

Well, I rebuilt my entire system just to do it since I couldn't find all the damn files to clean out after an installation and I had the time to kill. I followed this guide exactly step by step and I again I can't send or recieve mail. I think god doesn't want me to have an email server. Beyond frustrated at this point. Excellent guide but it doesn't work for me unfortunately.

I have the proper use flags set as per the guide, I went so far as to cut and paste the instructions out of the document into my system in case I was fat fingering something and still it doesn't work.

Edit: Forgot the important part of this post...
I GIVE UP.
Back to top
View user's profile Send private message
vesik
n00b
n00b


Joined: 16 Sep 2002
Posts: 14

PostPosted: Sun May 30, 2004 5:41 pm    Post subject: HOT TIP! Reply with quote

Get mutt working with this setup.

I near tore my hair out trying to get mutt to put "sent" messages into the INBOX/sent folder.

This is how you do it.

set record = =INBOX.sent

YES!!!!!!!!!!!

This works with any folder you want and also with the 'set postponed' directive.
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 200
Location: Flagstaff, AZ

PostPosted: Sun May 30, 2004 9:26 pm    Post subject: A few notes on Squirrelmail... Reply with quote

Tried to get Squirrelmail set up last night, the last little thing I had left to do. Just a few hints/tips that I discovered, that aren't really covered anywhere else.

First off, you need apache2 installed. (Which I'm assuming most of you have already). Secondly, you need php, and mod_php emerged.
Code:

> emerge php
> emerge mod_php


You then need to configure php if you want, but the defaults work for most people. The file is located in
Code:

/etc/apache2/conf/php.ini


All you need to do then, to make sure that php is recognized by apache2, and running, is uncomment, and set the following line:
Code:

in /etc/conf.d/apache2
APACH2_OPTS="-D PHP4"


You also need to edit the /etc/apache2/conf/mime.types
Code:

application/x-httpd-php          php


Restart apache2, and if you had problems parsing php code, it'll work after this. I have not had any problems with USE flags of IPv6, ssl, or mysql like some other programs. Alls well that ends well.

G'luck!
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
mobiusproject
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2003
Posts: 110

PostPosted: Sun May 30, 2004 9:50 pm    Post subject: Re: A few notes on Squirrelmail... Reply with quote

Crymson wrote:
First off, you need apache2 installed. (Which I'm assuming most of you have already). Secondly, you need php, and mod_php emerged.
Code:
> emerge php
> emerge mod_php
No, just emerge mod_php, this will install php as well, which really isn't needed for mod_perl, but anyways...

Crymson wrote:
All you need to do then, to make sure that php is recognized by apache2, and running, is uncomment, and set the following line:
Code:
in /etc/conf.d/apache2
APACH2_OPTS="-D PHP4"

Nice catch, this one actually took me a while the first time I set up apache on my machine. If you want to have perl installed too, remember to
Code:
ACCEPT_KEYWORDS="~x86" emerge mod_perl
 (or just add mod_perl to your /etc/portage/packages.keywords file and plain emerge mod_perl)

in /etc/conf.d/apache2
APACH2_OPTS="-D PHP4 -D PERL"


Crymson wrote:
You also need to edit the /etc/apache2/conf/mime.types
Code:
application/x-httpd-php          php

Not true. Gentoo actually has all of this already set up for you. Take a look at file:/etc/apache2/conf/modules.d/70_mod_php.conf. I thought that the config files in this directory were really cool the first time I saw them, and they are also all loaded when apache2 starts.
Back to top
View user's profile Send private message
ryker
Guru
Guru


Joined: 28 May 2003
Posts: 412
Location: Portage, IN

PostPosted: Mon May 31, 2004 3:50 am    Post subject: Reply with quote

When ever I add a new virtual user for a virtual domain, there are none of the common folders you would expect (ie. Trash, Sent, Outbox, ...) created in the .maildir. Does anyone know how to have these created by default for each new user? I am able to add them for each user manually through the mua, but I would like this to be automatic.
_________________
Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM
Back to top
View user's profile Send private message
darkcoder
Apprentice
Apprentice


Joined: 09 May 2003
Posts: 253
Location: Lynchburg, VA

PostPosted: Mon May 31, 2004 7:51 am    Post subject: Reply with quote

I installed my server following the steps in the official Gentoo qmail howto. Then after it was working, made the changes that were described in this howto (thanks btw), but I think that the scanning of viruses is not done, since I send two test messages, one with eicar.com and other with a variant of Netsky and both attachments arrive unharmed to a hotmail and yahoo accounts.

While I have not performed a spam test probably is not working also. Tryied these two spamd settings without success:
Code:
SPAMD_OPTS="-d -u vpopmail -v -x -C /etc/mail/spamassassin/local.cf"
SPAMD_OPTS="-v -u vpopmail --siteconfigpath=/etc/mail/spamassassin/local.cf"


Have f-prot installed in /opt/f-prot and was detected by the qmail-scanner as this shows:
Code:
my $fprot_binary='/opt/f-prot/f-prot';
my $fsecure_binary='';
my $inocucmd_binary='';
my $ravlin_binary='';
my $clamscan_binary='';
my $spamc_binary='/usr/bin/spamc';
my $spamc_options=' -c -f';
my $spamc_subject='*****SPAM*****';
my $spamassassin_binary='/usr/bin/spamassassin';
my ($sa_comment,$tag_score);


and the output of ps aux | grep tcpserver
Code:

qmaild    3139  0.0  0.1  1592  876 pts/1    S    03:31   0:00 /usr/bin/tcpserver -H -R -l -0 -R -x /etc/tcp.smtp.cdb -c 40 -u 201 -g 200 0.0.0.0 smtp /var/qmail/bin/qmail-smtpd pop.mundolink.net /var/vpopmail/bin/vchkpw /bin/true
root      3230  0.0  0.1  1552  824 pts/1    S    03:45   0:00 grep tcpserver

_________________
Not bleeding edge.... No pain no game :twisted:
Back to top
View user's profile Send private message
mobiusproject
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2003
Posts: 110

PostPosted: Tue Jun 01, 2004 9:24 am    Post subject: Reply with quote

darkcoder -
I do believe that when you send e-mail from the machine that you install all of this on, the default config says to not scan for virii and spam. Take a look at either /etc/tcp.smtp or /etc/tcprules.d/tcp.qmail-smtp and look for the line starting
Code:
127.0.0.1:

My line is
Code:
127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-queue"
and thus it doesn't check for virii and spam when coming from my machine. It will scan for every other machine because of the line
Code:
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"

This might be the reason why you have virii getting through the scanner, because its not actually scanning it.
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Tue Jun 01, 2004 11:29 am    Post subject: Re: A few notes on Squirrelmail... Reply with quote

mobiusproject wrote:
Crymson wrote:
All you need to do then, to make sure that php is recognized by apache2, and running, is uncomment, and set the following line:
Code:
in /etc/conf.d/apache2
APACH2_OPTS="-D PHP4"

Nice catch, this one actually took me a while the first time I set up apache on my machine. If you want to have perl installed too, remember to
Code:
ACCEPT_KEYWORDS="~x86" emerge mod_perl
 (or just add mod_perl to your /etc/portage/packages.keywords file and plain emerge mod_perl)

in /etc/conf.d/apache2
APACH2_OPTS="-D PHP4 -D PERL"



You should probably use a secure connection when sending passwords over the internett. Then do it this way:
Code:
APACH2_OPTS="-D SSL -D PHP4 -D PERL"


And take a look at this instructionfile:
/var/www/localhost/htdocs/squirrelmail/plugins/secure_login/INSTALL
(Step 1 of the instructions was automatically done for you when you emerged squirrelmail.)
Back to top
View user's profile Send private message
ryker
Guru
Guru


Joined: 28 May 2003
Posts: 412
Location: Portage, IN

PostPosted: Wed Jun 02, 2004 1:24 am    Post subject: Reply with quote

Anyone have any ideas about my default folders question, or is this one of those RTFM things that I just couldn't find? :)
_________________
Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM
Back to top
View user's profile Send private message
Nazzy
n00b
n00b


Joined: 26 May 2004
Posts: 34

PostPosted: Wed Jun 02, 2004 6:16 am    Post subject: Reply with quote

I'd just like to point out the net-mail/f-prot is now in apps-antivirus/f-prot
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Wed Jun 02, 2004 9:13 am    Post subject: Reply with quote

ryker wrote:
Anyone have any ideas about my default folders question, or is this one of those RTFM things that I just couldn't find? :)


Your question is quite interesting. It would be nice to have some kind of skeletondir with files (and dirs) that will be copied into the new users maildir folder. That way you can include a default .qmail file, a welcome mail and default folders.

The easiest way I see to do this automatically is to make a bash script that creates the account and copies the files.
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Wed Jun 02, 2004 9:21 am    Post subject: Reply with quote

A few things I would like to add to my mailsystem:

If the from field in a mail matches POSTMASTER@* or *DEAMON@* and the reciever account is [unknown_account]@mydomain.net the mail should be DROPED BEFORE it takes up any resources for spamchecking or virus scanning.
Anyone got any ideas of how to do this?

This kind of mail should not bounce. Just be dropped.

The reason I'm asking is that I experienced for about 10days in March that my old server recieved 30.000 mails like that, DAILY! The mailsystem totally broke down. (I'm running a mailserver with only 5 users including myself.)
Back to top
View user's profile Send private message
moscher
n00b
n00b


Joined: 07 May 2002
Posts: 47

PostPosted: Wed Jun 02, 2004 10:32 am    Post subject: Reply with quote

hi.
First of all this is a great howto.

imap works fine pop3 works fine, i can login to squirrelmail and qmailadmin, can create accounts and so on, the only thing not working seems to be the smtp server.
It gives me this error in squirrelmail:
Code:

Requested action not taken: mailbox name not allowed
Server replied: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)


would be great if you could give me some more advices what to do :)
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Wed Jun 02, 2004 2:04 pm    Post subject: Reply with quote

moscher wrote:

Code:

Requested action not taken: mailbox name not allowed
Server replied: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)


would be great if you could give me some more advices what to do :)


One of two things is wrong. If the computer you're sending the mail from is on the same localnet as the server, you probably would like it to be able to send mail without having to authorize. (Your webserver running squirrelmail should also be able to send mail without having to authorize.)

Make sure you have the /etc/tcp.smtp file right. Go over the last half of step 8 of the howto again, to make sure you did it right.

You may also recieve that error if your email client is not set up to authorize itself when the computer you're sending from has an IP adress outside the range of ip's you've listed in /etc/tcp.smpt. Set the client to authorize (provide a username and password) when sending mail, and you should do fine.
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Wed Jun 02, 2004 2:08 pm    Post subject: SSL Reply with quote

I just discovered that I have a small problem when it comes to SSL certificates when hosting multiple domains. What happens is that every time someone connects using a SSL connection they get a warning saying that the certificate is of a different domain than the address they connect to. Is there a way to have one server certificate for each virtual domain?
Back to top
View user's profile Send private message
moscher
n00b
n00b


Joined: 07 May 2002
Posts: 47

PostPosted: Wed Jun 02, 2004 2:21 pm    Post subject: Reply with quote

ok, went over step 8 again, now things seem to be ok, but now i get anohter error:

Code:

X-Qmail-Scanner-1.20:[h4048108618545546127488] Unable to open pipe to /var/qmail/bin/qmail-queue [16777215]
+(#4.3.0) - Broken pipe
X-Qmail-Scanner-1.20:[h4048108618545546127488] Unable to close pipe to /var/qmail/bin/qmail-queue [255]
+(#4.3.0) - Broken pipe
qmail-inject: fatal: qq temporary problem (#4.3.0)


this error comes up when i try to send a mail to another local user

ok, ran queue-fix, and everything is ok now
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 200
Location: Flagstaff, AZ

PostPosted: Thu Jun 03, 2004 12:01 am    Post subject: Ok this is really annoying Reply with quote

I'm still having problems with smtp-auth. Users can't send to any address that is not part of my domain. They get a 553 error - that domain isn't on my allowed list of rcpthosts (#5.7.1). The qmail-smtpd and qmail-send logs don't have anything to say about it, but the messages does:

Code:

Jun 2 16:50:31 enterprise vpopmail[2210]: vchkpw-smtp: password fail shiva@mydomain.org:xxx.xxx.xxx.xxx


I would expect the password to be the same as the password they use to check their mail, but am I wrong in this assumption? I've double checked the perms on /etc/vpopmail.conf and /var/vpopmail/bin/vchkpw, and they are as they should be (root:vpopmail, 640, and root:vpopmail 4711 respectively). I have also chown'd them to be vpopmail:vpopmail, didn't make a difference.

Am I correct in assuming that what is supplied, isn't matching what's in the sql database? If that's the case, is it a problem with authdaemon.plain? Is there a way I can see what is being transmitted vs. what is being checked? I don't have ssl or anything like that running. I really need to fix this, as noone on my domain can send mail to anyone that isn't also on my domain, and to be honest, it's PISSING ME OFF. Thanks in advance...
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
petterg
Guru
Guru


Joined: 25 Mar 2004
Posts: 500
Location: Oslo, Norway

PostPosted: Thu Jun 03, 2004 12:45 pm    Post subject: Re: Ok this is really annoying Reply with quote

Crymson wrote:
I'm still having problems with smtp-auth. Users can't send to any address that is not part of my domain. They get a 553 error - that domain isn't on my allowed list of rcpthosts (#5.7.1). The qmail-smtpd and qmail-send logs don't have anything to say about it, but the messages does:

Code:

Jun 2 16:50:31 enterprise vpopmail[2210]: vchkpw-smtp: password fail shiva@mydomain.org:xxx.xxx.xxx.xxx




Are you able to send mail to ppl outside your domain using squirrelmail (or other webmail)?

Are you able to log into your mysql server using the server, username, password and port number entered in you /etc/vpopmail.conf file?

Do you get any error when you try to add / delete users?

If you enter
Code:
**ipadress**:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-queue"

where **ipadress** is the ip of the pc you'll try to send mail from.
And run
Code:
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

Then set the mailclient on the pc to not send any username/password to smtp auth. Are you able to send mail?
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 200
Location: Flagstaff, AZ

PostPosted: Thu Jun 03, 2004 8:51 pm    Post subject: Re: Ok this is really annoying Reply with quote

petterg wrote:
Are you able to send mail to ppl outside your domain using squirrelmail (or other webmail)?

Yes. It all works as it should.

petterg wrote:
Are you able to log into your mysql server using the server, username, password and port number entered in you /etc/vpopmail.conf file?

Not sure you what you mean here - if you mean can I do the following -
Code:
# mysql -u vpopmail -p
Enter password: ****
Welcome to the MySQL monitor....

Yes. It accepts my password for vpopmail. I do not, however, know how to show the tables.

petterg wrote:
Do you get any error when you try to add / delete users?

No, no errors.

petterg wrote:

If you enter
Code:
**ipadress**:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-queue"

where **ipadress** is the ip of the pc you'll try to send mail from.
And run
Code:
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

Then set the mailclient on the pc to not send any username/password to smtp auth. Are you able to send mail?


Ok, I added that line to the bottom of tcp.smtp, and as an aside, does it matter that you told me to input qmail-queue.pl when my other line has qmail-scanner-queue.pl? Anyway, no, he was unable to send mail with no username/pass. The error he gets was:
Code:
Error while performing operation:
RCPT TO <crymson@****.org> failed: Requested action not taken: mailbox name not allowed


I looked in my /var/log/messages file, and I didn't even see a connection form him. When I had him test out using a username/pass, I got the vchkpw-smtp error again. (auth failed for user...) He got the same 553 error, about not being in the allowed list of rcpthosts.

Not really sure if that helps you. If you need me to post a config file, just name it. Thanks!!
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6 ... 23, 24, 25  Next
Page 5 of 25

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum