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

Discussion in 'HOWTO-Related Questions' started by gurneyzap, Mar 8, 2006.

  1. gurneyzap

    gurneyzap New Member

    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|foryou|greatcasino)@'i,
    qr'^(investments|lose_weight_today|market\.alert|money2you|MyGreenCard)@'i,
    qr'^(new\.tld\.registry|opt-out|opt-in|optin|saveonl|smoking2002k)@'i,
    qr'^(specialoffer|specialoffers|stockalert|stopsnoring|wantsome)@'i,
    qr'^(workathome|yesitsfree|your_friend|greatoffers)@'i,
    qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i,
    ); {ERROR IS HERE}

    map { $whitelist_sender{lc($_)}=1 } (qw(
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the exact error message?
     
  3. gurneyzap

    gurneyzap New Member

    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!
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Please make sure you saved the file with Unix linebreaks and not Windows linebreaks.
     
  5. gurneyzap

    gurneyzap New Member

    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...
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Now it's in line 13? That's far away from the first error... :confused:
     
  7. gurneyzap

    gurneyzap New Member

    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.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Are you using Debian Sarge?
     
  9. gurneyzap

    gurneyzap New Member

    Yes, I am. I installed part 1 and part 2 using the howto.
     
  10. falko

    falko Super Moderator ISPConfig Developer

    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.
     
  11. gurneyzap

    gurneyzap New Member

    This is my second time around. Same error. I'm going to do another fresh install today.
     
  12. gurneyzap

    gurneyzap New Member

    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).
     
  13. falko

    falko Super Moderator ISPConfig Developer

    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).
     
  14. gurneyzap

    gurneyzap New Member

    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.
     
  15. gurneyzap

    gurneyzap New Member

    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"
     
  16. falko

    falko Super Moderator ISPConfig Developer

    That's normal. Now you can type
    Code:
    ehlo localhost
    and then
    Code:
    quit
    or just
    Code:
    quit
    to leave telnet.

    Anything in the mail log?
     
  17. gurneyzap

    gurneyzap New Member

    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#
     
  18. falko

    falko Super Moderator ISPConfig Developer

    You should also check all the other configuration files for Windows linebreaks.
     
  19. gurneyzap

    gurneyzap New Member

    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!
     
  20. falko

    falko Super Moderator ISPConfig Developer

Share This Page