LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-03-2006, 07:44 AM   #16
squirtle
Member
 
Registered: Jun 2006
Posts: 55

Original Poster
Rep: Reputation: 15

May I ask some questions:
a) should I set up procmailrc to communicate with amavisd?
b) should I set up MySQL database to complete this spam filter?

Now my mail server is not set up the database to store information.
I use Maildir to keep the Inbox,Sent,Trash and others file.
Is I do some mistake in set up the mail server?


Thanks.

Last edited by squirtle; 10-03-2006 at 10:29 AM.
 
Old 10-03-2006, 07:44 AM   #17
squirtle
Member
 
Registered: Jun 2006
Posts: 55

Original Poster
Rep: Reputation: 15
I change notify_method same with forward_method but still can't work
Below is my maillog :

[root@root ~]# tail -f /var/log/maillog
Oct 3 23:24:37 root postfix/smtpd[4101]: cannot load RSA certificate and key data
Oct 3 23:24:37 root postfix/smtpd[4101]: connect from localhost.localdomain[127.0.0.1]
Oct 3 23:24:38 root postfix/smtpd[4101]: 5506420F147: client=localhost.localdomain[127.0.0.1]
Oct 3 23:24:38 root postfix/cleanup[4106]: 5506420F147: message-id=<49345.10.0.0.12.1159889078.squirrel@10.0.0.12>
Oct 3 23:24:38 root postfix/smtpd[4101]: disconnect from localhost.localdomain[127.0.0.1]
Oct 3 15:24:38 root postfix/qmgr[4095]: 5506420F147: from=<shujia@mailv6.fsktm.upm.edu.my>, size=768, nrcpt=1 (queue active)Oct 3 23:24:39 root postfix/lmtp[4107]: 5506420F147: to=<bing@mailv6.fsktm.upm.edu.my>, relay=none, delay=1, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Oct 3 23:24:39 root imap-login: Login: shujia [::ffff:127.0.0.1]
Oct 3 23:24:42 root imap-login: Login: shujia [::ffff:127.0.0.1]
Oct 3 15:24:54 root postfix/qmgr[4095]: warning: connect to transport amavis: No such file or directory
Oct 3 23:25:11 root imap-login: Login: bing [::ffff:127.0.0.1]
Oct 3 23:25:33 root last message repeated 5 times
Oct 3 23:25:46 root postfix/smtpd[4101]: connect from localhost.localdomain[127.0.0.1]
Oct 3 23:25:46 root postfix/smtpd[4101]: D08B120F148: client=localhost.localdomain[127.0.0.1]
Oct 3 23:25:46 root postfix/cleanup[4106]: D08B120F148: message-id=<57974.10.0.0.12.1159889146.squirrel@10.0.0.12>
Oct 3 15:25:47 root postfix/qmgr[4095]: D08B120F148: from=<bing@mailv6.fsktm.upm.edu.my>, size=746, nrcpt=1 (queue active)
Oct 3 23:25:47 root postfix/smtpd[4101]: disconnect from localhost.localdomain[127.0.0.1]
Oct 3 15:25:47 root postfix/lmtp[4107]: D08B120F148: to=<shujia@mailv6.fsktm.upm.edu.my>, relay=none, delay=1, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Oct 3 23:25:47 root imap-login: Login: bing [::ffff:127.0.0.1]
Oct 3 23:25:51 root last message repeated 2 times
Oct 3 15:25:54 root postfix/qmgr[4095]: warning: connect to transport amavis: No such file or directory
Oct 3 23:26:07 root imap-login: Login: shujia [::ffff:127.0.0.1]

Last edited by squirtle; 10-03-2006 at 10:28 AM.
 
Old 10-03-2006, 03:47 PM   #18
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you running amavisd and/or postfix chrooted? Your entry for amavisd in master.cf would suggest that the system thinks amavisd is.
 
Old 10-05-2006, 12:35 AM   #19
squirtle
Member
 
Registered: Jun 2006
Posts: 55

Original Poster
Rep: Reputation: 15
Thanks for remind me to check the chroot part.I can send and receive the mail.
May i ask how can I send my spam to the spam folder at client side.I use squirrelmail as web mail.I found online and teach me to create the own spam folder for each user.
Can give some hit how to check whether the amavisd is correct run.
Thanks.
Below is my new master.cf
[root@mailv6 racoon]# grep -v '^#' /etc/postfix/master.cf
smtp inet n - n - - smtpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
-o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes

127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8

[root@mailv6 racoo
 
Old 10-05-2006, 08:12 AM   #20
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Glad to hear your mail is going through

The way I do spam is:

In amvisd.conf have

$recipient_delimiter = '+';

and

@addr_extension_spam_maps = ('spam');

In main.cf have

recipient_delimiter = +

and then in each user's home directory have a file ".forward+spam" that contains

~/Maildir/.Spam/

(assuming the spam folder you created is called "Spam")

This should work.

Let me know how it goes
 
Old 10-05-2006, 09:50 AM   #21
squirtle
Member
 
Registered: Jun 2006
Posts: 55

Original Poster
Rep: Reputation: 15
Hai.Is ok if i not runnig postfix and amavisd-new at chroot mode?

May I ask the file ".forward+spam" is created by own with 'vi' command?
Is mean that I should create this file for each user?

Original use's directory is /home/bing/mail,inside the mail directory have Inbox,Sent,Trash and Drafts. Another dirctory is /home/bing/Maildir.Inside the Maildir have cur,new,temp directory.

May I ask that should i download DCC,razor,Bayesian to complete the amavisd new?
Thanks

Last edited by squirtle; 10-05-2006 at 11:12 PM.
 
Old 10-06-2006, 04:26 AM   #22
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
The setting in master.cf doesn't run services in chroot mode, it just tells postfix that the services are running in chroot mode - you need to set them up to run chrooted separately.

You will need a .forward+spam per user, but you'll notice the "~" at the beginning, which means "user's home directory". So, you should be able to create one file and copy it to each user's home directory - check the permissions and ownership though. I would think that that if you created it as user root and the relevant user group, you could just make sure that it has read rights for the user and group. If you have different groups, give all read access.

You will need to creat the .Spam directory under Maildir, and maybe the cur, new and tmp under .Spam.

On DCC, etc, I don't run Bayesian (at least I dont think I do - if not, I haven't tried it either), but the other 2 work a treat.

Rgds

Last edited by billymayday; 10-06-2006 at 04:28 AM.
 
Old 10-09-2006, 03:32 AM   #23
squirtle
Member
 
Registered: Jun 2006
Posts: 55

Original Poster
Rep: Reputation: 15
I have create the .forward+spam under the user's directory and Spam folder under Maildir.
After that,I issue this command to send spam and non spam messages.
[root@mailv6 test-messages]# sendmail -i bing@mailv6.fsktm.upm.edu.my <sample-spam.txt
[root@mailv6 test-messages]# sendmail -i bing@mailv6.fsktm.upm.edu.my <sample-nonspam.txt

But nothing happen in my bing/Maildir/cur and bing/Maildir/Spam.

How can I check whehter I success filter the spam messages?

Thanks
 
Old 10-09-2006, 07:55 AM   #24
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'm not sure what the default action for amavisd spam is. You may want to send your tests with

$sa_kill_level_deflt

set to 2000 or so (>1000) and use the test spam at

http://spamassassin.apache.org/gtube/
 
Old 10-09-2006, 07:57 AM   #25
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Actually, a simpler thing to do may be to just send the test message and then look at /var/log/maillog
 
Old 10-09-2006, 06:22 PM   #26
squirtle
Member
 
Registered: Jun 2006
Posts: 55

Original Poster
Rep: Reputation: 15
May I ask is ok if I not install promailrc,fetchmail ,and not use MySQL database in my postfix mail server.

This my final year project.I try to build up the mail server and try to filter the content of mail and separate them from user's Inbox.So now I stuck how to deliver the spam to trash folder in Squirrelmail.Hope can give some hint.

Thanks.
 
Old 10-10-2006, 03:28 AM   #27
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'm doing your final project froi you?

Is spam being delivered to the Spam folder?

If so, you should only need to change .forward+spam to forwared to a folder called trash
 
Old 10-10-2006, 04:23 AM   #28
squirtle
Member
 
Registered: Jun 2006
Posts: 55

Original Poster
Rep: Reputation: 15
Thanks so much.I will try it.Thanks a lot.Solution that given by you help me so much.
 
Old 10-11-2006, 09:41 AM   #29
squirtle
Member
 
Registered: Jun 2006
Posts: 55

Original Poster
Rep: Reputation: 15
still can't send to the user's spam folder.But the /var/log/maillog show the spam message will block and nonspam message is pass.
But whe i ssue this command
cat sample-spam.txt |sendmail bing@mailv6.fsktm.upm.edu.my
cat sample-nonspam.txt| sendmail bing@mailv6.fsktm.upm.edu.my
the var/log/maillog show is ok but I can't recieve in Spam folder.This also happen to non spam message.Nothing inside user's Inbox.I will find the solution until it work.

Thanks
 
Old 10-11-2006, 04:19 PM   #30
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try posting some of the log messages
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix - cannot send e-mail abapdr Linux - Software 13 08-13-2013 05:47 AM
not able to send mail using postfix Robin01 Linux - Software 4 12-28-2007 03:41 PM
just send mail using postfix shipon_97 Linux - Networking 1 08-10-2006 06:01 AM
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 4 07-11-2005 09:12 PM
Postfix will not send mail antken Linux - Networking 1 10-05-2003 06:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration