PDA

View Full Version : Amavid.conf in "Virutal Users and Domains with Postfix, Courier and MySQL (+SMTP


gurneyzap
8th March 2006, 17:04
I'm using the howto "Virtual Users and Domains with Postfix, Courier and MySQL (+SMTP-AUTH, Quota, SpamAssassin, ClamAV)

I've copy and pasted the amavisd.conf from the howto and when issuing the command /etc/init.d/amavis restart I get an error near ) I've put a remark next to where the message says the error is occurring. I've included a few lines before and after the error. Thanks for any help.


$localpart_is_case_sensitive = 0; # (default is false)

$blacklist_sender_re = new_RE(
qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryo u|greatcasino)@'i,
qr'^(investments|lose_weight_today|market\.alert|m oney2you|MyGreenCard)@'i,
qr'^(new\.tld\.registry|opt-out|opt-in|optin|saveonl|smoking2002k)@'i,
qr'^(specialoffer|specialoffers|stockalert|stopsno ring|wantsome)@'i,
qr'^(workathome|yesitsfree|your_friend|greatoffers )@'i,
qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i,
); {ERROR IS HERE}

map { $whitelist_sender{lc($_)}=1 } (qw(
nobody@cert.org
owner-alert@iss.net
slashdot@slashdot.org
bugtraq@securityfocus.com
NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM
security-alerts@linuxsecurity.com
amavis-user-admin@lists.sourceforge.net
razor-users-admin@lists.sourceforge.net

falko
8th March 2006, 20:41
What's the exact error message?

gurneyzap
8th March 2006, 21:05
The error message is:

mail2:/etc/amavis# /etc/init.d/amavis restart
Stopping amavisd: (not running).
Starting amavisd: Error in config file /etc/amavis/amavisd.conf: syntax error at /etc/amavis/amavisd.conf line 205, near ")"
(failed).

Thanks!

falko
8th March 2006, 21:35
Please make sure you saved the file with Unix linebreaks and not Windows linebreaks.

gurneyzap
8th March 2006, 21:51
Using Putty, I did a copy and paste from the Howto. The line numbers are different as after doing the paste the first time, I spent the time in vi doing some formating for readability. Without the cleanup, I still get the same error.

mail2:/etc/amavis# /etc/init.d/amavis restart
Stopping amavisd: (not running).
Starting amavisd: Error in config file /etc/amavis/amavisd.conf: syntax error at /etc/amavis/amavisd.conf line 13, near ")"
(failed).
mail2:/etc/amavis#

Thanks...

falko
9th March 2006, 10:25
Now it's in line 13? That's far away from the first error... :confused:

gurneyzap
9th March 2006, 16:30
I should have sent the line number in error using the original file and not the one I formatted. I formatted for readability so that I could easily read and try to learn what was going on since I'm a newbie.

falko
9th March 2006, 23:05
Are you using Debian Sarge?

gurneyzap
10th March 2006, 12:31
Yes, I am. I installed part 1 and part 2 using the howto.

falko
10th March 2006, 15:52
And you're sure you followed it as close as possible? Because it is working for me exactly as outlined in the tutorial. After I wrote the tutorial I followed it again to verify there are no errors in it.

gurneyzap
10th March 2006, 16:00
This is my second time around. Same error. I'm going to do another fresh install today.

gurneyzap
13th March 2006, 14:49
Same error after 3rd install. Any ideas before I give up and try a Windows solution? Thanks.

/etc/amavis# /etc/init.d/amavis restart
Stopping amavisd: (not running).
Starting amavisd: Error in config file /etc/amavis/amavisd.conf: syntax error at /etc/amavis/amavisd.conf line 13, near ")"
(failed).

falko
13th March 2006, 17:51
I have no idea what's wrong on your system if you're absolutely sure you don't have Windows linebreaks in /etc/amavisd.conf (something like this happens for example, if you save the file on a Windows PC and then transfer it to the Linux system).

gurneyzap
13th March 2006, 19:59
I did a copy and paste. I'll download rawwite and give that a try. Something else, when first going through setup and I issued the command "/etc/init.d/saslauthd" restart it worked fine Now I get "Starting SASL Authentication daemon: (failed). Also when creating SSL cert for TLS, I do not get ask the question "Enter the Fully Qualified Domain Name of the system" Any thoughts on these two items. Thanks.

gurneyzap
13th March 2006, 21:14
Save the file to my pc and ran rawwrite and ftpd it over. It Works! Not sure what happend using just copy and paste.
I've finished the howto and got the 250-StARTTLS AND 250-AUTH just like in the howto. I could not connect via outlook so I did a reboot of the mail server, MS workflow :(
Now when doing the telnet localhost 25 it hangs at the 220 server name. Sasl is still not restarting when doing "/etc/init.d/saslauthd restrart"

falko
13th March 2006, 23:22
Now when doing the telnet localhost 25 it hangs at the 220 server name.
That's normal. Now you can type ehlo localhost and then quit or just quit to leave telnet.

Sasl is still not restarting when doing "/etc/init.d/saslauthd restrart"Anything in the mail log?

gurneyzap
14th March 2006, 16:17
I'm not sure what ot post so here is a portion of my logs:

mail2:/var/log# more mail.warn
Mar 14 09:14:17 mail2 dccproc[1744]: socket(UDP): Address family not supported by protocol
Mar 14 10:01:16 mail2 imaplogin: DISCONNECTED, ip=[::ffff:12.107.55.130], time=0
Mar 14 10:02:00 mail2 authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=mail_admin)
Mar 14 10:02:05 mail2 imaplogin: LOGIN FAILED, ip=[::ffff:12.107.55.130]
Mar 14 10:02:09 mail2 imaplogin: DISCONNECTED, ip=[::ffff:12.107.55.130], time=9
Mar 14 10:02:09 mail2 authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=mail_admin)
Mar 14 10:02:14 mail2 imaplogin: LOGIN FAILED, ip=[::ffff:12.107.55.130]
mail2:/var/log# more mail.log
Mar 14 09:14:02 mail2 amavis[1366]: starting. amavisd-new at mail2 amavisd-new-20030616-p10, Unicode aware
Mar 14 09:14:02 mail2 amavis[1366]: Perl version 5.008004
Mar 14 09:14:02 mail2 amavis[1366]: Module Amavis::Conf 1.15
Mar 14 09:14:02 mail2 amavis[1366]: Module Archive::Tar 1.23
Mar 14 09:14:02 mail2 amavis[1366]: Module Archive::Zip 1.14
Mar 14 09:14:02 mail2 amavis[1366]: Module Compress::Zlib 1.34
Mar 14 09:14:02 mail2 amavis[1366]: Module Convert::TNEF 0.17
Mar 14 09:14:02 mail2 amavis[1366]: Module Convert::UUlib 1.051
Mar 14 09:14:02 mail2 amavis[1366]: Module DBI 1.46
Mar 14 09:14:02 mail2 amavis[1366]: Module DB_File 1.808
Mar 14 09:14:02 mail2 amavis[1366]: Module MIME::Entity 5.417
Mar 14 09:14:02 mail2 amavis[1366]: Module MIME::Parser 5.417
Mar 14 09:14:02 mail2 amavis[1366]: Module MIME::Tools 5.417
Mar 14 09:14:02 mail2 amavis[1366]: Module Mail::Header 1.62
Mar 14 09:14:02 mail2 amavis[1366]: Module Mail::Internet 1.62
Mar 14 09:14:02 mail2 amavis[1366]: Module Mail::SpamAssassin 3.000003
Mar 14 09:14:02 mail2 amavis[1366]: Module Net::Cmd 2.26
Mar 14 09:14:02 mail2 amavis[1366]: Module Net::DNS 0.48
Mar 14 09:14:02 mail2 amavis[1366]: Module Net::SMTP 2.29
Mar 14 09:14:02 mail2 amavis[1366]: Module Net::Server 0.87
Mar 14 09:14:02 mail2 amavis[1366]: Module Time::HiRes 1.59
Mar 14 09:14:02 mail2 amavis[1366]: Module Unix::Syslog 0.100
Mar 14 09:14:02 mail2 amavis[1367]: Found $file at /usr/bin/file
Mar 14 09:14:02 mail2 amavis[1367]: No $arc, not using it
Mar 14 09:14:02 mail2 amavis[1367]: Found $gzip at /bin/gzip
Mar 14 09:14:02 mail2 amavis[1367]: Found $bzip2 at /usr/bin/bzip2
Mar 14 09:14:02 mail2 amavis[1367]: No $lzop, not using it
Mar 14 09:14:02 mail2 amavis[1367]: No $lha, not using it
Mar 14 09:14:02 mail2 amavis[1367]: Found $unarj at /usr/bin/arj
Mar 14 09:14:02 mail2 amavis[1367]: Found $uncompress at /bin/uncompress
Mar 14 09:14:02 mail2 amavis[1367]: No $unfreeze, not using it
Mar 14 09:14:02 mail2 amavis[1367]: No $unrar, not using it
Mar 14 09:14:02 mail2 amavis[1367]: Found $zoo at /usr/bin/zoo
Mar 14 09:14:02 mail2 amavis[1367]: Found $cpio at /bin/cpio
Mar 14 09:14:02 mail2 amavis[1367]: Using internal av scanner code for (primary) Clam Antivirus-clamd
Mar 14 09:14:02 mail2 amavis[1367]: Found secondary av scanner Clam Antivirus - clamscan at /usr/bin/clamscan
Mar 14 09:14:06 mail2 authdaemond.mysql: modules="authmysql", daemons=5
Mar 14 09:14:07 mail2 dccifd[1477]: 1.2.74 listening to /var/lib/dcc/dccifd
Mar 14 09:14:11 mail2 postfix/postfix-script: starting the Postfix mail system
Mar 14 09:14:11 mail2 postfix/master[1682]: daemon started -- version 2.1.5
Mar 14 09:14:17 mail2 dccproc[1744]: socket(UDP): Address family not supported by protocol
Mar 14 10:01:16 mail2 imaplogin: Connection, ip=[::ffff:12.107.55.130]
Mar 14 10:01:16 mail2 imaplogin: DISCONNECTED, ip=[::ffff:12.107.55.130], time=0
Mar 14 10:02:00 mail2 imaplogin: Connection, ip=[::ffff:12.107.55.130]
Mar 14 10:02:00 mail2 authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=mail_admin)
Mar 14 10:02:05 mail2 imaplogin: LOGIN FAILED, ip=[::ffff:12.107.55.130]
Mar 14 10:02:09 mail2 imaplogin: DISCONNECTED, ip=[::ffff:12.107.55.130], time=9
Mar 14 10:02:09 mail2 imaplogin: Connection, ip=[::ffff:12.107.55.130]
Mar 14 10:02:09 mail2 authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=mail_admin)
Mar 14 10:02:14 mail2 imaplogin: LOGIN FAILED, ip=[::ffff:12.107.55.130]
mail2:/var/log# Mar 14 10:02:05 mail2 imaplogin: LOGIN FAILED, ip=[::ffff:12.107.55.130]
-bash: Mar: command not found
mail2:/var/log# Mar 14 10:02:09 mail2 imaplogin: DISCONNECTED, ip=[::ffff:12.107.55.130], time=9
-bash: Mar: command not found
mail2:/var/log# Mar 14 10:02:09 mail2 imaplogin: Connection, ip=[::ffff:12.107.55.130]
-bash: Mar: command not found
mail2:/var/log# Mar 14 10:02:09 mail2 authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=mail_admin)
-bash: syntax error near unexpected token `('
mail2:/var/log# Mar 14 10:02:14 mail2 imaplogin: LOGIN FAILED, ip=[::ffff:12.107.55.130]
-bash: Mar: command not found
mail2:/var/log#

falko
14th March 2006, 17:42
mail2:/var/log# Mar 14 10:02:09 mail2 imaplogin: Connection, ip=[::ffff:12.107.55.130]
-bash: Mar: command not found
mail2:/var/log# Mar 14 10:02:09 mail2 authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=mail_admin)
-bash: syntax error near unexpected token `('
mail2:/var/log# Mar 14 10:02:14 mail2 imaplogin: LOGIN FAILED, ip=[::ffff:12.107.55.130]
-bash: Mar: command not found
mail2:/var/log#
You should also check all the other configuration files for Windows linebreaks.

gurneyzap
16th March 2006, 16:21
No line breaks but I had a 1 letter typo :-(
I can now send and receive email!! Now to setup a web mail frontend. I do not see a howto on Squirrelmail. Any pit falls for a newbie installing this that you know of? Thanks for all your help!

falko
16th March 2006, 17:52
Any pit falls for a newbie installing this that you know of?
No. But you could also try sqwebmail, as described here: http://workaround.org/articles/ispmail-sarge/#webmail
It gives you autoresponders. :)