View Single Post
  #6  
Old 14th October 2010, 17:23
DKLeader DKLeader is offline
Senior Member
 
Join Date: Sep 2010
Location: Ishoej, Denmark
Posts: 113
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Ok, did some changes after reading the replies.
First of postfix was also running on my web server (192.168.1.90 - web.superweb.dk) - must have been from when I ran all as single server trying out ISPConfig3.

The PHP I have used for testing now looks like this :
Code:
<?php
$reciever = "24timer@24-timerssejlads.dk";
$subject = "Et emnefelt";

$massage = "<h1 style='background-color: #006699'>
            This is a test mail
          </h1>";

$header  = "MIME-Version: 1.0" . "\r\n";
$header .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$header .= "from:24timer@24-timerssejlads.dk";

mail($reciever, $subject, $message, $header);
?>
In the log there was some errors regarding connection to the mysql.
Changed all mysql-*.cf files to have the same user and pasword as the mail server (192.168.1.60 - mail.superweb.dk)
Also changed the host in same files to 192.168.1.60

My main.cf looks like this (after my changes) :
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.superweb.dk
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.superweb.dk
relayhost =
mynetwork = mail.superweb.dk
# mynetworks = 127.0.0.0/8 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_dom$
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = maildrop
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
content_filter = amavis:[192.168.1.60]:10024
receive_override_options = no_address_mappings
And from the mail.log :
Code:
Oct 14 17:01:28 SuperWebServer10 postfix/master[6261]: daemon started -- version 2.5.5, configuration /etc/postfix
Oct 14 17:01:41 SuperWebServer10 postfix/pickup[6262]: 50C5D3EC13E: uid=33 from=<www-data>
Oct 14 17:01:41 SuperWebServer10 postfix/cleanup[6271]: 50C5D3EC13E: message-id=<20101014150141.50C5D3EC13E@mail.superweb.dk>
Oct 14 17:01:41 SuperWebServer10 postfix/qmgr[6263]: 50C5D3EC13E: from=<www-data@SuperWebServer10.superweb.dk>, size=378, nrcpt=1 (queue active)
Oct 14 17:01:41 SuperWebServer10 postfix/smtp[6274]: connect to 192.168.1.60[192.168.1.60]:10024: Connection refused
Oct 14 17:01:41 SuperWebServer10 postfix/smtp[6274]: 50C5D3EC13E: to=<24timer@24-timerssejlads.dk>, relay=none, delay=0.07, delays=0.06/0.01/0/0, dsn=4.4.1, status=deferred (connect to 192.168.1.60[192.168.1.60]:10024: Connection refused)
Oct 14 17:02:10 SuperWebServer10 postfix/pickup[6262]: 0732F3EC13F: uid=33 from=<www-data>
Oct 14 17:02:10 SuperWebServer10 postfix/cleanup[6271]: 0732F3EC13F: message-id=<20101014150210.0732F3EC13F@mail.superweb.dk>
Oct 14 17:02:10 SuperWebServer10 postfix/qmgr[6263]: 0732F3EC13F: from=<www-data@SuperWebServer10.superweb.dk>, size=378, nrcpt=1 (queue active)
Oct 14 17:02:10 SuperWebServer10 postfix/smtp[6274]: connect to 192.168.1.60[192.168.1.60]:10024: Connection refused
Oct 14 17:02:10 SuperWebServer10 postfix/smtp[6274]: 0732F3EC13F: to=<24timer@24-timerssejlads.dk>, relay=none, delay=0.06, delays=0.06/0/0/0, dsn=4.4.1, status=deferred (connect to 192.168.1.60[192.168.1.60]:10024: Connection refused)
change IP in
Code:
content_filter = amavis:[192.168.1.60]:10024
to 127.0.0.1 in the main.cf

And mail.log :
Code:
Oct 14 17:11:08 SuperWebServer10 postfix/pickup[6501]: 441983EC140: uid=33 from=<www-data>
Oct 14 17:11:08 SuperWebServer10 postfix/cleanup[6520]: 441983EC140: message-id=<20101014151108.441983EC140@mail.superweb.dk>
Oct 14 17:11:08 SuperWebServer10 postfix/qmgr[6502]: 441983EC140: from=<www-data@SuperWebServer10.superweb.dk>, size=378, nrcpt=1 (queue active)
Oct 14 17:11:08 SuperWebServer10 postfix/smtp[6504]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Oct 14 17:11:08 SuperWebServer10 postfix/smtp[6504]: 441983EC140: to=<24timer@24-timerssejlads.dk>, relay=none, delay=0.06, delays=0.06/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
//DKLeader
__________________
VoiceMe
Communications


Hosted at :
SuperWeb.dk
a part of VoiceMe
Reply With Quote