Virtual Users And Domains With Postfix, Courier And MySQL

Discussion in 'HOWTO-Related Questions' started by wmrwl, Sep 18, 2006.

  1. wmrwl

    wmrwl New Member

    Hi, I am using the Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) and am having some trouble. I can't get my MS Outlook to communicate with the mail server. I have the "my server requires authentication" checked off.

    The install is on debian sarge 3.1.

    #The output of telnet localhost 25 is:
    telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 mail.domain.com ESMTP Postfix (Debian/GNU)
    ehlo localhost
    250-mail.domain.com
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    250 8BITMIME


    #The output of /var/log/mail.err is:

    Sep 18 04:30:18 back1 postfix/trivial-rewrite[6269]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:30:20 back1 postfix/trivial-rewrite[6272]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:31:21 back1 postfix/trivial-rewrite[6274]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:32:22 back1 postfix/trivial-rewrite[6277]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:33:23 back1 postfix/trivial-rewrite[6280]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:34:24 back1 postfix/trivial-rewrite[6283]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:35:25 back1 postfix/trivial-rewrite[6286]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:36:26 back1 postfix/trivial-rewrite[6289]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:37:27 back1 postfix/trivial-rewrite[6292]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:38:28 back1 postfix/trivial-rewrite[6295]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
    Sep 18 04:39:29 back1 postfix/trivial-rewrite[6306]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem

    # The /etc/postfix/mysql-virtual_mailboxes.cf reads as follows:
    user = mail_admin
    password = mypassword
    dbname = mail
    table = users
    select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    where_field = email
    hosts = 10.0.0.3

    What exactly is wrong here?

    Thanks,

    Rob
     
    Last edited: Sep 18, 2006
  2. grasomega

    grasomega New Member

    Hi, there!

    Make the following line look like this in main.cf:

    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf

    Delete the 'proxy' in front of the 'mysql:/etc/postfix/mysql-virtual_mailboxes.cf'.
    If still nothing, try to remove all the 'proxy' specifications in main.cf.

    grasomega
     
  3. falko

    falko Super Moderator

    Also compare your configuration files with those from the tutorial. Also check their formatting as it matters.
     
  4. wmrwl

    wmrwl New Member

    I did this.

    I did this too. I did notice that /var/log/mail.log contained some errors about my host not being able to connect to mysql, so I fixed that up and it helped the mailbox to pass this diagnostic test (it was previously timing out): http://www.mxtoolbox.com/diagnostic.aspx, but i still cant get MS Outlook to work properly with the mail server.

    I chose "this server requires authentication" and I chose the radio box that says "use the same settings as my incoming mail server".

    I also checked off boxes that said "this server requires an encrypted connection (SSL)" for both the incoming imap (port 993) and outgoing mail smtp (port 25).

    Is there anything else I could be doing wrong.
     
  5. grasomega

    grasomega New Member

    Now I saw this:

    If the MySql server is on the same machine, your 'hosts' statement should look like this:

    hosts = 127.0.0.1

    Otherwise, the "My server requires authentication" box must be checked, no SSL, no Secure Password Authentication (SPA).
    The logon name is the e-mail address, not the name.
    It should be working, if anything else is in the right place.

    grasomega
     
  6. wmrwl

    wmrwl New Member

    I tried Outlook with all of those options and it still cant connect to the server.
    ________
    BDSM FETISH
     
    Last edited: Mar 30, 2011
  7. grasomega

    grasomega New Member

    So, your log is still filled with the info you posted in your first post, right?
    I don't really know what can be wrong, but please check again that the right password is specified in _every_ file .cf, also in /etc/amavis/amavisd.conf, /etc/postfix/sasl/smtpd.conf, /etc/pam.d/smtp, /etc/courier/authmysqlrc. I'm not sure if there are other files with the database password...

    One other thing I would do: drop the database and create it again and make sure that the mail_admin user has the correct permissions on the database.

    If there are other related errors on your log, please post them.

    grasomega

    edit:

    And, by the way, have you tried any other e-mail client? Is squirrelmail working?
     
    Last edited: Sep 21, 2006
  8. wmrwl

    wmrwl New Member

    I am getting some new and different errors in mail.log

    Here are the new and different errors in mail.log:

    Sep 20 06:49:19 myboxname postfix/qmgr[2194]: 1D612234287: from=<myotheremail@ddress.com>, size=1248, nrcpt=1 (queue active)
    Sep 20 06:49:19 myboxname postfix/qmgr[2194]: 9173F234285: from=<myotheremail@ddress.com>, size=2414, nrcpt=1 (queue active)
    Sep 20 06:49:19 myboxname postfix/qmgr[2194]: 943F8234286: from=<myotheremail@ddress.com>, size=2394, nrcpt=1 (queue active)
    Sep 20 06:49:19 myboxname postfix/smtp[2731]: connect to 10.0.0.3[10.0.0.3]: Connection refused (port 10024)
    Sep 20 06:49:19 myboxname postfix/smtp[2732]: connect to 10.0.0.3[10.0.0.3]: Connection refused (port 10024)
    Sep 20 06:49:20 myboxname postfix/smtp[2731]: 1D612234287: to=<admin@domain.com>, relay=none, delay=15123, status=deferred (connect to 10.0.0.3[10.0.0.3]: Connection refused)
    Sep 20 06:49:20 myboxname postfix/smtp[2732]: 9173F234285: to=<admin@domain.com>, relay=none, delay=15855, status=deferred (connect to 10.0.0.3[10.0.0.3]: Connection refused)
    Sep 20 06:49:20 myboxname postfix/smtp[2731]: connect to 10.0.0.3[10.0.0.3]: Connection refused (port 10024)
    Sep 20 06:49:20 myboxname postfix/smtp[2731]: 943F8234286: to=<admin@domain.com>, relay=none, delay=15855, status=deferred (connect to 10.0.0.3[10.0.0.3]: Connection refused)
    Sep 20 07:05:59 myboxname postfix/qmgr[2194]: 390EB23427E: from=<myotheremail@ddress.com>, size=2411, nrcpt=1 (queue active)

    ########
    mail.err is now empty
     
    Last edited: Sep 21, 2006
  9. grasomega

    grasomega New Member

    It looks like you have a problem related to amavis.
    Try to put back 127.0.0.1 in your config files, as per the how-to.

    Can you please post all your config( the .cf files, main.cf, master.cf, /etc/postfix/sasl/smtpd.conf, /etc/amavis.amavisd.conf, /etc/courier/authmysqlrc, /etc/pam.d/smtp) files? Feel free to replace your real domain with anything, just be consistent about changes.

    I can compare them with mine, and mine work :)

    grasomega
     
  10. wmrwl

    wmrwl New Member

    /etc/mysql/my.cnf reads as
    Code:
    bind-address            = 10.0.0.3
    because I use this machine as a mysql server and other machines on the network need to connect to this machine. If this file had 127.0.0.1 instead, then the other machines cannot connect to it (I've tried to change it as you suggested, but the other machines on the network failed to connect to it.)

    The replacements I made for the domain name and the mysql password are in italics. Thanks!

    Main.cf
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (mail)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    myhostname = mail.[I]domain[/I].com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.[I]domain[/I].com, localhost, localhost.localdomain
    relayhost =
    mynetworks = 10.0.0.0/24
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains =
    virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static 5000
    virtual_gid_maps = static 5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = mysql:/etc/postfix/mysql-virtual_transports.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
    content_filter = amavis:[10.0.0.3]:10024
    #receive_override_options = no_address_mappings
     
    Last edited: Sep 22, 2006
  11. wmrwl

    wmrwl New Member

    Master.cf
    Code:
    #
    # Postfix master process configuration file.  Each logical line
    # describes how a Postfix daemon program should be run.
    #
    # A logical line starts with non-whitespace, non-comment text.
    # Empty lines and whitespace-only lines are ignored, as are comment
    # lines whose first non-whitespace character is a `#'.
    # A line that starts with whitespace continues a logical line.
    #
    # The fields that make up each line are described below. A "-" field
    # value requests that a default value be used for that field.
    #
    # Service: any name that is valid for the specified transport type
    # (the next field).  With INET transports, a service is specified as
    # host:port.  The host part (and colon) may be omitted. Either host
    # or port may be given in symbolic form or in numeric form. Examples
    # for the SMTP server:  localhost:smtp receives mail via the loopback
    # interface only; 10025 receives mail on port 10025.
    #
    # Transport type: "inet" for Internet sockets, "unix" for UNIX-domain
    # sockets, "fifo" for named pipes.
    #
    # Private: whether or not access is restricted to the mail system.
    # Default is private service.  Internet (inet) sockets can't be private.
    #
    # Unprivileged: whether the service runs with root privileges or as
    # the owner of the Postfix system (the owner name is controlled by the
    # mail_owner configuration variable in the main.cf file). Only the
    # pipe, virtual and local delivery daemons require privileges.
    #
    # Chroot: whether or not the service runs chrooted to the mail queue
    # directory (pathname is controlled by the queue_directory configuration
    # variable in the main.cf file). Presently, all Postfix daemons can run
    # chrooted, except for the pipe, virtual and local delivery daemons.
    # The proxymap server can run chrooted, but doing so defeats most of
    # the purpose of having that service in the first place.
    # The files in the examples/chroot-setup subdirectory describe how
    # to set up a Postfix chroot environment for your type of machine.
    #
    # Wakeup time: automatically wake up the named service after the
    # specified number of seconds. A ? at the end of the wakeup time
    # field requests that wake up events be sent only to services that
    # are actually being used.  Specify 0 for no wakeup. Presently, only
    # the pickup, queue manager and flush daemons need a wakeup timer.
    #
    # Max procs: the maximum number of processes that may execute this
    # service simultaneously. Default is to use a globally configurable
    # limit (the default_process_limit configuration parameter in main.cf).
    # Specify 0 for no process count limit.
    #
    # Command + args: the command to be executed. The command name is
    # relative to the Postfix program directory (pathname is controlled by
    # the daemon_directory configuration variable). Adding one or more
    # -v options turns on verbose logging for that service; adding a -D
    # option enables symbolic debugging (see the debugger_command variable
    # in the main.cf configuration file). See individual command man pages
    # for specific command-line options, if any.
    #
    # General main.cf options can be overridden for specific services.
    # To override one or more main.cf options, specify them as arguments
    # below, preceding each option by "-o".  There must be no whitespace
    # in the option itself (separate multiple values for an option by
    # commas).
    #
    # In order to use the "uucp" message tranport below, set up entries
    # in the transport table.
    #
    # In order to use the "cyrus" message transport below, configure it
    # in main.cf as the mailbox_transport.
    #
    # SPECIFY ONLY PROGRAMS THAT ARE WRITTEN TO RUN AS POSTFIX DAEMONS.
    # ALL DAEMONS SPECIFIED HERE MUST SPEAK A POSTFIX-INTERNAL PROTOCOL.
    #
    # DO NOT SHARE THE POSTFIX QUEUE BETWEEN MULTIPLE POSTFIX INSTANCES.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       -       -       -       smtpd
    #submission inet n      -       -       -       -       smtpd
    #       -o smtpd_etrn_restrictions=reject
    #628      inet  n       -       -       -       -       qmqpd
    pickup    fifo  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      fifo  n       -       -       300     1       qmgr
    #qmgr     fifo  n       -       -       300     1       oqmgr
    rewrite   unix  -       -       -       -       -       trivial-rewrite
    bounce    unix  -       -       -       -       0       bounce
    defer     unix  -       -       -       -       0       bounce
    trace     unix  -       -       -       -       0       bounce
    verify    unix  -       -       -       -       1       verify
    flush     unix  n       -       -       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       -       -       -       smtp
    relay     unix  -       -       -       -       -       smtp
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       n       -       -       lmtp
    anvil     unix  -       -       n       -       1       anvil
    #
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
    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=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
    scalemail-backend unix  -       n       n       -       2       pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    
    # only used by postfix-tls
    #tlsmgr   fifo  -       -       n       300     1       tlsmgr
    #smtps    inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #587      inet  n       -       n       -       -       smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    
    ###### ADDED BY ROB ON 9/12/2006 ######################
    
    amavis unix - - - - 2 smtp
    #       -o smtp_data_done_timeout=1200
            -o smpt_send_xforward_command=yes
    10.0.0.3:10025 inet 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=10.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtpd_bind_address=10.0.0.3
    
    
     
  12. wmrwl

    wmrwl New Member

    /etc/postfix/sasl/smtpd.conf
    Code:
    pwcheck_method: saslauthd
    mech_list: plain login
    allow_plaintext: true
    auxprop_plugin: mysql
    sql_hostnames: 10.0.0.3
    sql_user: mail_admin
    sql_passwd: [I]mail_admin_password[/I]
    sql_database: mail
    sql_select: select password from users where email = '%u'
    ________
    Bdsm Shock
    ________
    Theea
     
    Last edited: Apr 22, 2011
  13. wmrwl

    wmrwl New Member

    /etc/amavis.amavisd.conf
    Code:
    se strict;
    
    $MYHOME = '/var/lib/amavis';   # (default is '/var/amavis')
    
    $mydomain = 'localhost';
    
    # $myhostname = 'host.example.com';  # fqdn of this host, default by uname(3)
    
    $daemon_user  = 'amavis';        # (no default (undef))
    $daemon_group = 'amavis';        # (no default (undef))
    
    $ENV{TMPDIR} = $TEMPBASE;       # wise to set TMPDIR, but not obligatory
    
    $max_servers  =  4;   # number of pre-forked children          (default 2)
    $max_requests = 10;   # retire a child after that many accepts (default 10)
    
    $child_timeout=5*60;  # abort child if it does not complete each task in n sec
                          # (default: 8*60 seconds)
    
    # @bypass_virus_checks_acl = qw( . );  # uncomment to DISABLE anti-virus code
    # @bypass_spam_checks_acl  = qw( . );  # uncomment to DISABLE anti-spam code
    
    @local_domains_acl = ( ".$mydomain" );  # $mydomain and its subdomains
    
    $relayhost_is_client = 0;         # (defaults to false)
    
    $insert_received_line = 1;
    
    $unix_socketname = undef;
    
    $inet_socket_port = 10024;
    $inet_socket_bind = '127.0.0.1';
    @inet_acl = qw( 127.0.0.1 );
    
    $DO_SYSLOG = 1;
    $LOGFILE = "/var/log/amavis.log";  # (defaults to empty, no log)
    
    #$log_level = 2;                # (defaults to 0)
    
    $log_templ = '[? %#V |[? %#F |[?%#D|Not-Delivered|Passed]|BANNED name/type (%F)]|INFECTED (%V)], #
    [?%o|(?)|<%o>] -> [<%R>|,][? %i ||, quarantine %i], Message-ID: %m, Hits: %c';
    
    read_l10n_templates('en_US', '/etc/amavis');
    
    $final_virus_destiny      = D_REJECT; # (defaults to D_BOUNCE)
    $final_banned_destiny     = D_REJECT;  # (defaults to D_BOUNCE)
    $final_spam_destiny       = D_PASS;  # (defaults to D_REJECT)
    $final_bad_header_destiny = D_PASS;  # (defaults to D_PASS), D_BOUNCE suggested
    
    $viruses_that_fake_sender_re = new_RE(
      qr'nimda|hybris|klez|bugbear|yaha|braid|sobig|fizzer|palyh|peido|holar'i,
      qr'tanatos|lentin|bridex|mimail|trojan\.dropper|dumaru|parite|spaces'i,
      qr'dloader|galil|gibe|swen|netwatch|bics|sbrowse|sober|rox|val(hal)?la'i,
      qr'frethem|sircam|be?agle|tanx|mydoom|novarg|shimg|netsky|somefool|moodown'i,
      qr'@mm|@MM',    # mass mailing viruses as labeled by f-prot and uvscan
      qr'Worm'i,      # worms as labeled by ClamAV, Kaspersky, etc
      [qr'^(EICAR|Joke\.|Junk\.)'i         => 0],
      [qr'^(WM97|OF97|W95/CIH-|JS/Fort)'i  => 0],
      [qr/.*/ => 1],  # true by default  (remove or comment-out if undesired)
    );
    
    $virus_admin = "postmaster\@$mydomain";                # due to D_DISCARD default
    
    $mailfrom_to_quarantine = '';   # override sender address with null return path
    
    $QUARANTINEDIR = '/var/lib/amavis/virusmails';
    
    $virus_quarantine_to  = 'virus-quarantine';    # traditional local quarantine
    $spam_quarantine_to = 'spam-quarantine';
    
    $X_HEADER_TAG = 'X-Virus-Scanned';        # (default: undef)
    $X_HEADER_LINE = "by $myversion (Debian) at $mydomain";
    
    $undecipherable_subject_tag = '***UNCHECKED*** ';  # undef disables it
    
    $remove_existing_x_scanned_headers = 0; # leave existing X-Virus-Scanned alone
    #$remove_existing_x_scanned_headers= 1; # remove existing headers
                                            # (defaults to false)
    #$remove_existing_spam_headers = 0;     # leave existing X-Spam* headers alone
    $remove_existing_spam_headers  = 1;     # remove existing spam headers if
                                            # spam scanning is enabled (default)
    
    $keep_decoded_original_re = new_RE(
    # qr'^MAIL$',   # retain full original message for virus checking (can be slow)
      qr'^MAIL-UNDECIPHERABLE$',  # retain full mail if it contains undecipherables
      qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
    # qr'^Zip archive data',
    );
    
    $banned_filename_re = new_RE(
    #  qr'^UNDECIPHERABLE$',  # is or contains any undecipherable components
       qr'\.[^.]*\.(exe|vbs|pif|scr|bat|cmd|com|dll)$'i, # some double extensions
       qr'[{}]',     # curly braces in names (serve as Class ID extensions - CLSID)
    #  qr'.\.(exe|vbs|pif|scr|bat|cmd|com)$'i,           # banned extension - basic
    #  qr'.\.(ade|adp|bas|bat|chm|cmd|com|cpl|crt|exe|hlp|hta|inf|ins|isp|js|
    #         jse|lnk|mdb|mde|msc|msi|msp|mst|pcd|pif|reg|scr|sct|shs|shb|vb|
    #         vbe|vbs|wsc|wsf|wsh)$'ix,                  # banned extension - long
    #  qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i, # banned extension - WinZip vulnerab.
    #  qr'^\.(zip|lha|tnef|cab)$'i,                      # banned file(1) types
    #  qr'^\.exe$'i,                                     # banned file(1) types
    #  qr'^application/x-msdownload$'i,                  # banned MIME types
    #  qr'^application/x-msdos-program$'i,
       qr'^message/partial$'i,  # rfc2046. this one is deadly for Outcrook
    #  qr'^message/external-body$'i, # block rfc2046
    );
    
    @lookup_sql_dsn = ( ['DBI:mysql:database=mail;host=10.0.0.3;port=3306', 'mail_admin', '[I]mail_admin_password[/I]'] );
    
    $sql_select_policy = 'SELECT "Y" as local FROM domains WHERE CONCAT("@",domain) IN (%k)';
    
    $sql_select_white_black_list = undef;  # undef disables SQL white/blacklisting
    
    $recipient_delimiter = '+';                # (default is '+')
    
    $replace_existing_extension = 1;        # (default is false)
    
    $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,
    );
    
    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
      notification-return@lists.sophos.com
      mailman-announce-admin@python.org
      zope-announce-admin@zope.org
      owner-postfix-users@postfix.org
      owner-postfix-announce@postfix.org
      owner-sendmail-announce@lists.sendmail.org
      sendmail-announce-request@lists.sendmail.org
      ca+envelope@sendmail.org
      owner-technews@postel.ACM.ORG
      lvs-users-admin@LinuxVirtualServer.org
      ietf-123-owner@loki.ietf.org
      cvs-commits-list-admin@gnome.org
      rt-users-admin@lists.fsck.com
      owner-announce@mnogosearch.org
      owner-hackers@ntp.org
      owner-bugs@ntp.org
      clp-request@comp.nus.edu.sg
      surveys-errors@lists.nua.ie
      emailNews@genomeweb.com
      owner-textbreakingnews@CNNIMAIL12.CNN.COM
      yahoo-dev-null@yahoo-inc.com
    ));
    
    $MAXLEVELS = 14;                # (default is undef, no limit)
    
    $MAXFILES = 1500;                # (default is undef, no limit)
    
    $MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
    $MAX_EXPANSION_QUOTA = 300*1024*1024;  # bytes  (default undef, not enforced)
    $MIN_EXPANSION_FACTOR =   5;  # times original mail size  (must be specified)
    $MAX_EXPANSION_FACTOR = 500;  # times original mail size  (must be specified)
    
    $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
    
    $file   = 'file';   # file(1) utility; use 3.41 or later to avoid vulnerability
    
    $gzip   = 'gzip';
    $bzip2  = 'bzip2';
    $lzop   = 'lzop';
    $uncompress = ['uncompress', 'gzip -d', 'zcat'];
    $unfreeze   = ['unfreeze', 'freeze -d', 'melt', 'fcat'];
    $arc        = ['nomarch', 'arc'];
    $unarj      = ['arj', 'unarj'];  # both can extract, arj is recommended
    $unrar      = ['rar', 'unrar'];  # both can extract, same options
    $zoo    = 'zoo';
    $lha    = 'lha';
    $cpio   = 'cpio';   # comment out if cpio does not support GNU options
    
    $sa_local_tests_only = 0;   # (default: false)
    #$sa_auto_whitelist = 1;    # turn on AWL (default: false)
    
    # Timout for SpamAssassin. This is only used if spamassassin does NOT
    # override it (which it often does if sa_local_tests_only is not true)
    $sa_timeout = 30;           # timeout in seconds for a call to SpamAssassin
                                # (default is 30 seconds, undef disables it)
    
    # AWL (auto whitelisting), requires spamassassin 2.44 or better
    # $sa_auto_whitelist = 1;   # defaults to undef
    
    $sa_mail_body_size_limit = 150*1024;
    
    $sa_tag_level_deflt  = 3.0; # add spam info headers if at, or above that level
    $sa_tag2_level_deflt = 4.0; # add 'spam detected' headers at that level
    $sa_kill_level_deflt = $sa_tag2_level_deflt;
    
    $sa_dsn_cutoff_level = 10;
    
    $sa_spam_subject_tag = '***SPAM*** ';
    
    $first_infected_stops_scan = 1;
    
    @av_scanners = (
    
    ### http://www.clamav.net/
    ['Clam Antivirus-clamd',
      \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
      qr/\bOK$/, qr/\bFOUND$/,
      qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
    # NOTE: run clamd under the same user as amavisd;  match the socket
    # name (LocalSocket) in clamav.conf to the socket name in this entry
    # When running chrooted one may prefer: ["CONTSCAN {}\n","$MYHOME/clamd"],
    
    );
    
    @av_scanners_backup = (
    
      ### http://www.clamav.net/
      ['Clam Antivirus - clamscan', 'clamscan',
        "--stdout --no-summary -r --tempdir=$TEMPBASE {}", [0], [1],
        qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
    
    );
    
    1;  # insure a defined return
    
    
     
  14. wmrwl

    wmrwl New Member

    /etc/courier/authmysqlrc
    Code:
    ##VERSION: $Id: authmysqlrc,v 1.17 2004/04/20 01:38:17 mrsam Exp $
    #
    # Copyright 2000-2004 Double Precision, Inc.  See COPYING for
    # distribution information.
    #
    # Do not alter lines that begin with ##, they are used when upgrading
    # this configuration.
    #
    # authmysqlrc created from authmysqlrc.dist by sysconftool
    #
    # DO NOT INSTALL THIS FILE with world read permissions.  This file
    # might contain the MySQL admin password!
    #
    # Each line in this file must follow the following format:
    #
    # field[spaces|tabs]value
    #
    # That is, the name of the field, followed by spaces or tabs, followed by
    # field value.  Trailing spaces are prohibited.
    
    
    ##NAME: LOCATION:0
    #
    # The server name, userid, and password used to log in.
    
    MYSQL_SERVER            10.0.0.3
    MYSQL_USERNAME          mail_admin
    MYSQL_PASSWORD          [I]mail_admin_password[/I]
    
    ##NAME: MYSQL_SOCKET:0
    #
    # MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the
    # filesystem pipe used for the connection
    #
    # MYSQL_SOCKET          /var/run/mysqld/mysqld.sock
    
    ##NAME: MYSQL_PORT:0
    #
    # MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to
    # connect to.
    
    MYSQL_PORT              0
    
    ##NAME: MYSQL_OPT:0
    #
    # Leave MYSQL_OPT as 0, unless you know what you're doing.
    
    MYSQL_OPT               0
    
    ##NAME: MYSQL_DATABASE:0
    #
    # The name of the MySQL database we will open:
    
    MYSQL_DATABASE          mail
    
    ##NAME: MYSQL_USER_TABLE:0
    #
    # The name of the table containing your user data.  See README.authmysqlrc
    # for the required fields in this table.
    
    MYSQL_USER_TABLE        users
    
    ##NAME: MYSQL_CRYPT_PWFIELD:0
    #
    # Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined.  Both
    # are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
    # passwords go into MYSQL_CLEAR_PWFIELD.  Cleartext passwords allow
    # CRAM-MD5 authentication to be implemented.
    
    MYSQL_CRYPT_PWFIELD     password
    
    ##NAME: MYSQL_CLEAR_PWFIELD:0
    #
    #
    # MYSQL_CLEAR_PWFIELD   clear
    
    ##NAME: MYSQL_DEFAULT_DOMAIN:0
    #
    # If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user',
    # we will look up 'user@DEFAULT_DOMAIN' instead.
    #
    #
    # DEFAULT_DOMAIN                example.com
    
    ##NAME: MYSQL_UID_FIELD:0
    #
    # Other fields in the mysql table:
    #
    # MYSQL_UID_FIELD - contains the numerical userid of the account
    #
    MYSQL_UID_FIELD         5000
    
    ##NAME: MYSQL_GID_FIELD:0
    #
    # Numerical groupid of the account
    
    MYSQL_GID_FIELD         5000
    
    ##NAME: MYSQL_LOGIN_FIELD:0
    #
    # The login id, default is id.  Basically the query is:
    #
    #  SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid'
    #
    
    MYSQL_LOGIN_FIELD       email
    
    ##NAME: MYSQL_HOME_FIELD:0
    #
    
    MYSQL_HOME_FIELD        "/home/vmail"
    
    ##NAME: MYSQL_NAME_FIELD:0
    #
    # The user's name (optional)
    
    #MYSQL_NAME_FIELD       name
    
    ##NAME: MYSQL_MAILDIR_FIELD:0
    #
    # This is an optional field, and can be used to specify an arbitrary
    # location of the maildir for the account, which normally defaults to
    # $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
    #
    # You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
    # out.
    #
    MYSQL_MAILDIR_FIELD     CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    
    ##NAME: MYSQL_DEFAULTDELIVERY:0
    #
    # Courier mail server only: optional field specifies custom mail delivery
    # instructions for this account (if defined) -- essentially overrides
    # DEFAULTDELIVERY from ${sysconfdir}/courierd
    #
    # MYSQL_DEFAULTDELIVERY defaultdelivery
    
    ##NAME: MYSQL_QUOTA_FIELD:0
    #
    # Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally
    # specify a maildir quota.  See README.maildirquota for more information
    #
    # MYSQL_QUOTA_FIELD     quota
    
    ##NAME: MYSQL_AUXOPTIONS:0
    #
    # Auxiliary options.  The MYSQL_AUXOPTIONS field should be a char field that
    # contains a single string consisting of comma-separated "ATTRIBUTE=NAME"
    # pairs.  These names are additional attributes that define various per-account
    # "options", as given in INSTALL's description of the "Account OPTIONS"
    # setting.
    #
    # MYSQL_AUXOPTIONS_FIELD        auxoptions
    #
    # You might want to try something like this, if you'd like to use a bunch
    # of individual fields, instead of a single text blob:
    #
    # MYSQL_AUXOPTIONS_FIELD        CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablewebmail=",disablewebmail,",sharedgroup=",sharedgroup)
    #
    # This will let you define fields called "disableimap", etc, with the end result
    # being something that the OPTIONS parser understands.
    
    
    ##NAME: MYSQL_WHERE_CLAUSE:0
    #
    # This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary
    # fixed string that is appended to the WHERE clause of our query
    #
    # MYSQL_WHERE_CLAUSE    server='mailhost.example.com'
    
    ##NAME: MYSQL_SELECT_CLAUSE:0
    #
    # (EXPERIMENTAL)
    # This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database,
    # which is structuraly different from proposed. The fixed string will
    # be used to do a SELECT operation on database, which should return fields
    # in order specified bellow:
    #
    # username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options
    #
    # The username field should include the domain (see example below).
    #
    # Enabling this option causes ignorance of any other field-related
    # options, excluding default domain.
    #
    # There are two variables, which you can use. Substitution will be made
    # for them, so you can put entered username (local part) and domain name
    # in the right place of your query. These variables are:
    #               $(local_part), $(domain), $(service)
    #
    # If a $(domain) is empty (not given by the remote user) the default domain
    # name is used in its place.
    #
    # $(service) will expand out to the service being authenticated: imap, imaps,
    # pop3 or pop3s.  Courier mail server only: service will also expand out to
    # "courier", when searching for local mail account's location.  In this case,
    # if the "maildir" field is not empty it will be used in place of
    # DEFAULTDELIVERY.  Courier mail server will also use esmtp when doing
    # authenticated ESMTP.
    #
    # This example is a little bit modified adaptation of vmail-sql
    # database scheme:
    #
    # MYSQL_SELECT_CLAUSE   SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),                      \
    #                       CONCAT('{MD5}', popbox.password_hash),          \
    #                       popbox.clearpw,                                 \
    #                       domain.uid,                                     \
    #                       domain.gid,                                     \
    #                       CONCAT(domain.path, '/', popbox.mbox_name),     \
    #                       '',                                             \
    #                       domain.quota,                                   \
    #                       '',                                             \
    #                       CONCAT("disableimap=",disableimap,",disablepop3=",    \
    #                              disablepop3,",disablewebmail=",disablewebmail, \
    #                              ",sharedgroup=",sharedgroup)             \
    #                       FROM popbox, domain                             \
    #                       WHERE popbox.local_part = '$(local_part)'       \
    #                       AND popbox.domain_name = '$(domain)'            \
    #                       AND popbox.domain_name = domain.domain_name
    
    
    ##NAME: MYSQL_ENUMERATE_CLAUSE:0
    #
    # {EXPERIMENTAL}
    # Optional custom SQL query used to enumerate accounts for authenumerate,
    # in order to compile a list of accounts for shared folders.  The query
    # should return the following fields: name, uid, gid, homedir, maildir
    #
    # Example:
    # MYSQL_ENUMERATE_CLAUSE        SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),                      \
    #                       domain.uid,                                     \
    #                       domain.gid,                                     \
    #                       CONCAT(domain.path, '/', popbox.mbox_name),     \
    #                       ''                                              \
    #                       FROM popbox, domain                             \
    #                       WHERE popbox.local_part = '$(local_part)'       \
    #                       AND popbox.domain_name = '$(domain)'            \
    #                       AND popbox.domain_name = domain.domain_name
    
    
    
    ##NAME: MYSQL_CHPASS_CLAUSE:0
    #
    # (EXPERIMENTAL)
    # This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database,
    # which is structuraly different from proposed. The fixed string will
    # be used to do an UPDATE operation on database. In other words, it is
    # used, when changing password.
    #
    # There are four variables, which you can use. Substitution will be made
    # for them, so you can put entered username (local part) and domain name
    # in the right place of your query. There variables are:
    #       $(local_part) , $(domain) , $(newpass) , $(newpass_crypt)
    #
    # If a $(domain) is empty (not given by the remote user) the default domain
    # name is used in its place.
    # $(newpass) contains plain password
    # $(newpass_crypt) contains its crypted form
    #
    # MYSQL_CHPASS_CLAUSE   UPDATE  popbox                                  \
    #                       SET     clearpw='$(newpass)',                   \
    #                               password_hash='$(newpass_crypt)'        \
    #                       WHERE   local_part='$(local_part)'              \
    #                       AND     domain_name='$(domain)'
    #
    
     
  15. wmrwl

    wmrwl New Member

    /etc/pam.d/smtp:
    Code:
    auth    required        pam_mysql.so user=mail_admin passwd=[I]mail_admin_password[/I] host=10.0.0.3 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
    account sufficent       pam_mysql.so user=mail_admin passwd=[I]mail_admin_password[/I] host=10.0.0.3 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
    
    ________
    Vicodin rehab forums
    ________
    LovelyWendie
     
    Last edited: Apr 22, 2011
  16. grasomega

    grasomega New Member

    In main.cf set:

    mynetworks = 127.0.0.0/8
    content_filter = amavis:[127.0.0.1]:10024

    In master.cf set:

    -o mynetworks=127.0.0.0/8
    -o smtpd_bind_address=127.0.0.1


    In /etc/courier/authmysqlrc set:

    MYSQL_PORT 3306

    Also, set

    MYSQL_QUOTA_FIELD quota

    to be able to read the quota field in the table.


    All the smtp and amavis related stuff it's happening in the localhost.
    All the mysql should be on 10.0.0.3, if you need to access the server from outside.

    Please try it and see what;s going on.

    grasomega
     
  17. wmrwl

    wmrwl New Member

    I made the changes exactly as you suggested and this is whats in /var/log/mail.log now:

    Code:
    Sep 22 13:08:40 [I]myboxname[/I] postfix/postfix-script: stopping the Postfix mail system
    Sep 22 13:08:40 [I]myboxname[/I] postfix/master[2476]: terminating on signal 15
    Sep 22 13:08:40 [I]myboxname[/I] postfix/postfix-script: starting the Postfix mail system
    Sep 22 13:08:41 [I]myboxname[/I] postfix/master[4604]: daemon started -- version 2.1.5
    Sep 22 13:09:01 [I]myboxname[/I] authdaemond.mysql: restarting authdaemond children
    Sep 22 13:09:01 [I]myboxname[/I] authdaemond.mysql: modules="authmysql", daemons=5
    Sep 22 13:09:01 [I]myboxname[/I] authdaemond.mysql: modules="authmysql", daemons=5
    Sep 22 13:10:51 [I]myboxname[/I] postfix/smtpd[4638]: connect from mxtb-pws1.mxtoolbox.com[                                              64.20.227.131]
    Sep 22 13:10:51 [I]myboxname[/I] postfix/smtpd[4638]: NOQUEUE: reject: RCPT from mxtb-pws1.                                              mxtoolbox.com[64.20.227.131]: 554 <test@mxtoolbox.com>: Relay access denied; fro                                              m=<test@mxtoolbox.com> to=<test@mxtoolbox.com> proto=SMTP helo=<mxtoolbox.com>
    Sep 22 13:10:51 [I]myboxname[/I] postfix/smtpd[4638]: disconnect from mxtb-pws1.mxtoolbox.c                                              om[64.20.227.131]
    Sep 22 13:12:54 [I]myboxname[/I] authdaemond.mysql: restarting authdaemond children
    Sep 22 13:12:54 [I]myboxname[/I] authdaemond.mysql: modules="authmysql", daemons=5
    Sep 22 13:12:54 [I]myboxname[/I] dccifd[1988]: 1.2.74 rejected messages to 0 targets and di                                              scarded messages to 0 targets among 0 total since 09/22/06 00:00:00
    Sep 22 13:12:58 [I]myboxname[/I] postfix/postfix-script: stopping the Postfix mail system
    Sep 22 13:12:58 [I]myboxname[/I] postfix/master[4604]: terminating on signal 15
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: starting.  amavisd-new at [I]myboxname[/I] amavisd-new-                                              20030616-p10, Unicode aware
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Perl version               5.008004
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Amavis::Conf        1.15
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Archive::Tar        1.23
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Archive::Zip        1.14
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Compress::Zlib      1.34
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Convert::TNEF       0.17
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Convert::UUlib      1.051
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module DBI                 1.46
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module DB_File             1.808
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module MIME::Entity        5.417
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module MIME::Parser        5.417
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module MIME::Tools         5.417
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Mail::Header        1.62
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Mail::Internet      1.62
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Mail::SpamAssassin  3.000003
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Net::Cmd            2.26
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Net::DNS            0.48
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Net::SMTP           2.29
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Net::Server         0.87
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Time::HiRes         1.59
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1898]: Module Unix::Syslog        0.100
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Found $file       at /usr/bin/file
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: No $arc,          not using it
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Found $gzip       at /bin/gzip
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Found $bzip2      at /usr/bin/bzip2
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: No $lzop,         not using it
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: No $lha,          not using it
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Found $unarj      at /usr/bin/arj
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Found $uncompress at /bin/uncompress
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: No $unfreeze,     not using it
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: No $unrar,        not using it
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Found $zoo        at /usr/bin/zoo
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Found $cpio       at /bin/cpio
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Using internal av scanner code for (primary)                                               Clam Antivirus-clamd
    Sep 22 13:13:20 [I]myboxname[/I] amavis[1899]: Found secondary av scanner Clam Antivirus -                                               clamscan at /usr/bin/clamscan
    Sep 22 13:13:24 [I]myboxname[/I] authdaemond.mysql: modules="authmysql", daemons=5
    Sep 22 13:13:25 [I]myboxname[/I] dccifd[1988]: 1.2.74 listening to /var/lib/dcc/dccifd
    Sep 22 13:13:26 [I]myboxname[/I] postfix/postfix-script: starting the Postfix mail system
    Sep 22 13:13:26 [I]myboxname[/I] postfix/master[2184]: daemon started -- version 2.1.5
    Sep 22 13:13:27 [I]myboxname[/I] postfix/qmgr[2191]: 110FF23424A: from=<[I]mypersonalemail[/I]@hotmail.com>,                                               size=1347, nrcpt=1 (queue active)
    Sep 22 13:13:27 [I]myboxname[/I] postfix/smtp[2195]: connect to 10.0.0.3[10.0.0.3]: Connect                                              ion refused (port 10024)
    Sep 22 13:13:27 [I]myboxname[/I] postfix/smtp[2195]: 110FF23424A: to=<admin@fizpop.com>, re                                              lay=none, delay=147491, status=deferred (connect to 10.0.0.3[10.0.0.3]: Connecti                                              on refused)
    Sep 22 13:19:27 [I]myboxname[/I] postfix/smtpd[2245]: connect from bay0-omc2-s9.bay0.hotmai                                              l.com[65.54.246.145]
    Sep 22 13:19:28 [I]myboxname[/I] postfix/smtpd[2245]: 334982340E4: client=bay0-omc2-s9.bay0                                              .hotmail.com[65.54.246.145]
    Sep 22 13:19:28 [I]myboxname[/I] postfix/cleanup[2252]: 334982340E4: message-id=<BAY119-F24                                              348283BE9EEDC9BA9009BC210@phx.gbl>
    Sep 22 13:19:28 [I]myboxname[/I] postfix/qmgr[2191]: 334982340E4: from=<[I]mypersonalemail[/I]@hotmail.com>,                                               size=1436, nrcpt=1 (queue active)
    Sep 22 13:19:28 [I]myboxname[/I] postfix/smtp[2255]: connect to 127.0.0.1[127.0.0.1]: Conne                                              ction refused (port 10024)
    Sep 22 13:19:28 [I]myboxname[/I] postfix/smtp[2255]: 334982340E4: to=<admin@fizpop.com>, re                                              lay=none, delay=0, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection                                               refused)
    Sep 22 13:19:28 [I]myboxname[/I] postfix/smtpd[2245]: disconnect from bay0-omc2-s9.bay0.hot                                              mail.com[65.54.246.145]
    
     
  18. grasomega

    grasomega New Member

    The format of the log is not really easy to read, as it is in the forum page...
    Can you please post as an attachment?
    Also, post some of the syslog and both mail.err and mail.info.

    I couldn't follow your main.cf file (too many hours in front of the computer :) ), so I have attached my main.cf. Try to use it, see what's up, post some logs...

    From what I could get from your last post, it sure is better than before, but I'm not sure what's wrong.

    grasomega

    edit:

    One more thing: make sure that in every mysql_virtual-*.cf file you have
    hosts = 10.0.0.3

    not 127.0.0.1.
    And remove the # in front of the last line in main.cf.
     

    Attached Files:

    Last edited: Sep 22, 2006
  19. wmrwl

    wmrwl New Member

    I used your main.cf (and made appropriate changes for domain names,etc.) and i restarted postfix and here is my mail.log file.
     
  20. wmrwl

    wmrwl New Member

    Attached Files:

    Last edited: Apr 22, 2011

Share This Page