PDA

View Full Version : Loads of Probs, Fresh OpenSuSE Install


samuch
20th April 2009, 02:24
I followed the install guide to a T and just went to setup the first site. After creating the client, site, and email domain, nothing appears to work.

The website content does not come up and gives me a 404 page even though I made sure to put the site content in the created folder:
/srv/www/domainname.com

Also, the email does not work for the one account I created. The last mail err log shows:

Apr 19 15:47:07 web postfix/postmap[3652]: fatal: open /etc/postfix/virtusertable: No such file or directory

I can login to the email account with squirrelmail but when I go to send mail it says:

Transaction failed
554 5.7.1 <name@destination.com>: Relay access denied

What am I possibly missing? In version 2 I would have to do /etc/init.d/ispconfig restart when something like this happened. However I see that doesn't exist anymore.

Please help!

falko
20th April 2009, 13:13
The website content does not come up and gives me a 404 page even though I made sure to put the site content in the created folder:
/srv/www/domainname.comYou must put it into /srv/www/domainname.com/web.

Also, the email does not work for the one account I created. The last mail err log shows:

Apr 19 15:47:07 web postfix/postmap[3652]: fatal: open /etc/postfix/virtusertable: No such file or directory

I can login to the email account with squirrelmail but when I go to send mail it says:

Transaction failed
554 5.7.1 <name@destination.com>: Relay access denied

What am I possibly missing? In version 2 I would have to do /etc/init.d/ispconfig restart when something like this happened. However I see that doesn't exist anymore.

Please help!What's in /etc/postfix/main.cf?

samuch
20th April 2009, 14:59
The website issue was fixed by going into the admin page and specifying the public IP under the System > Edit Server IP page and then going into the site properties and specifying that IP address in the dropdown instead of the *.

For the mail, in my main.cf I have the following (minus the comments):


queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
debug_peer_level = 2
sendmail_path = /usr/sbin/sendmail

newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
html_directory = /usr/share/doc/packages/postfix-doc/html
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix-doc/samples
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_alias_domains =
relocated_maps = hash:/etc/postfix/relocated
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = my.domain.com
delay_warning_time = 1h
message_strip_characters = \0
program_directory = /usr/lib/postfix
inet_interfaces = all
masquerade_domains =
mydestination = my.domain.com, localhost, localhost.localdomain
defer_transports =
mynetworks_style = subnet
disable_dns_lookups = no
relayhost =
mailbox_command =
mailbox_transport =
strict_8bitmime = no
disable_mime_output_conversion = no
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
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
smtpd_use_tls = yes
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 0
mynetworks = 127.0.0.0/8
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
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.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_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
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:[127.0.0.1]:10024
receive_override_options = no_address_mappings

Rune
20th April 2009, 16:08
I know next to nothing about ISPConfig, but I have configured postfix servers before and these lines below jumped out at me mate

myhostname = my.domain.com
mydestination = my.domain.com, localhost, localhost.localdomain

Unless the domain pointing to your machine is actually called my.domain.com those aren't really going to work

These are what I generally use and they've always worked well enough:

myhostname = mail.your-proper-domain-name.com
mydomain = your-proper-domain-name.com
myorigin = $mydomain
mydestination = $mydomain, $myhostname, localhost, localhost.$mydomain

myhostname is the hostname of the mail server as defined in your dns mx records, mydomain is the domain pointing to the machine

If your domain were samuch.com you would replace your-proper-domain-name.com in the above lines to say that, something like this:

myhostname = mail.samuch.com


There may be other things, those are just what jumped out at me, there is one other thing I generally define that you don't have though

You have: inet_protocols = all

It's fairly common to also have: inet_interfaces = all

You don't have it, not sure exactly what differences ispconfig uses compared to a 'normal' main.cf but it would be worth you trying the above

Can't even get the ispconfig to install on my machine but I thought I'd check out your thread as I'm also using suse ... best of luck mate, you're already having more of it than I am so far

samuch
21st April 2009, 06:15
For my mail issues, when emailing the accounts the bouncebacks show user unknown errors.

If I do 'maildrop -d user@domain.com' it reports "Invalid user specified".

So is it possible that ISPConfig isn't updating the virtual user tables properly? If not, how can I force it to do this so I can get the mail flowing again?

My /etc/postfix/master.cf is as follows:


#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
#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
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
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
#localhost:10025 inet n - n - - smtpd -o content_filter=
scache unix - - n - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=R user=vmail argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/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
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
retry unix - - n - - error
proxywrite unix - - n - 1 proxymap

amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes

127.0.0.1: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,rej ect
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_chec ks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1

falko
21st April 2009, 17:01
Can you change
maildrop unix - n n - - pipe
flags=R user=vmail argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}

to
maildrop unix - n n - - pipe
flags=R user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
and restart Postfix?

samuch
21st April 2009, 19:20
That gets me a bit closer. The email doesn't immediately bounce back and if I check the maul-queue from the web interface it shows the following:


-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
0303C2DA219 2243 Tue Apr 21 09:33:10 sender@test.com
(temporary failure. Command output: /usr/bin/maildrop: Error opening /etc/maildroprc.)
recipient@domain.com

till
21st April 2009, 20:21
Looks as if your maildrop binary is not fully installed. The file /etc/maildroprc is not used or changed by ispconfig, it must be part of te maldrop package of your linux distribution. You should try to uninstall and then reinstall maildrop.

samuch
21st April 2009, 21:29
You were right. The version of maildrop I grabbed from one of the OpenSuSE repos apparently didn't work.

If anyone else needs to know, this is the one I used in the end:
http://download.opensuse.org/repositories/home:/cboltz:/branches:/server:/mail/openSUSE_11.1/x86_64/maildrop-2.0.4-11.1.x86_64.rpm

So now the emails come in, but don't go out. Here's the error from sending with squirrelmail:


Transaction failed
554 5.7.1 <recipient@outsidedomain.com>: Relay access denied

till
22nd April 2009, 10:37
Please enable smtp authentication in your email client.

samuch
22nd April 2009, 14:04
I was just testing with Squirrelmail on the actual server. I had installed it just like the install guide said. Is there a separate spot you have to enable authentication for Squirrelmail? I assumed that was handled by the initial login to it.

till
22nd April 2009, 14:06
Please post the mynetworks line from postfix main.cf

samuch
22nd April 2009, 14:11
The two lines that say anything about mynetworks are


mynetworks_style = subnet
mynetworks = 127.0.0.0/8

till
22nd April 2009, 14:13
then you should be able to connect with squirrelmail without using authentication as long as you configured squirrelmail to connect to the smtp server on localhost or 127.0.0.1 and not any other hostname or IP.

samuch
22nd April 2009, 14:31
Squirrelmail is set to use localhost. The logs also show the connection coming from localhost:


Apr 22 04:37:50 web postfix/smtpd[27199]: connect from localhost[::1]
Apr 22 04:37:50 web postfix/smtpd[27199]: NOQUEUE: reject: RCPT from localhost[::1]: 554 5.7.1 <receipient@outside.com>: Relay access denied; from=<my@address.com> to=<recipient@outside.com> proto=ESMTP helo=<address.com>
Apr 22 04:37:50 web postfix/smtpd[27199]: lost connection after RCPT from localhost[::1]

till
22nd April 2009, 14:53
Your server uses ipv6 while postfix is configured in mynetworks for ipv4 only. Change the mynetworks line to:

mynetworks = 127.0.0.0/8 [::1]/128

and restart postfix.

samuch
22nd April 2009, 14:57
Once again, you are the best! That was the issue.

I completely forgot that OpenSuSE, by default, sets up IPV6.

Thanks for your patience! Now onto moving these sites over.

reason8
5th May 2009, 12:26
Hello and good morning. I am having the same problem. I am using Opensuse 11.1 also and I have changed my networks to reflect ipv 6. SquirrelMail now sends the email and doesn't give me the relay error but I am not receiving the email message sent. I am also having the same problem with my thunderbird email client. The logs show the following:

[This is the time frame of the email sent]

May 5 02:17:07 isp postfix/smtpd[4942]: connect from unknown[59.92.14.169]
May 5 02:17:08 isp postfix/smtpd[4942]: 33C0676689: client=unknown[59.92.14.169]
May 5 02:17:08 isp postfix/cleanup[4954]: 33C0676689: message-id=<000d01c9cd62$2b5e01c0$6400a8c0@yoknapatawpharg61>
May 5 02:17:09 isp postfix/qmgr[4402]: 33C0676689: from=, size=2803, nrcpt=1 (queue active)
May 5 02:17:09 isp clamd[19973]: SelfCheck: Database status OK.
May 5 02:17:09 isp postfix/smtpd[4942]: disconnect from unknown[59.92.14.169]
May 5 02:17:13 isp postfix/smtp[4955]: 33C0676689: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=5.8, delays=0.94/0.05/0.02/4.8, dsn=2.5.0, status=sent (250 2.5.0 Ok, id=32552-20, DISCARD(bounce.suppressed))
May 5 02:17:13 isp postfix/qmgr[4402]: 33C0676689: removed
May 5 02:17:42 isp postfix/smtpd[4942]: connect from unknown[123.238.74.133]
May 5 02:17:42 isp postfix/smtpd[4942]: D77F876689: client=unknown[123.238.74.133]
May 5 02:17:43 isp postfix/cleanup[4954]: D77F876689: message-id=<000d01c9cd62$45afad80$6400a8c0@vizorsg1>
May 5 02:17:43 isp postfix/qmgr[4402]: D77F876689: from=, size=1800, nrcpt=1 (queue active)
May 5 02:17:43 isp postfix/smtpd[4942]: disconnect from unknown[123.238.74.133]
May 5 02:17:50 isp postfix/smtp[4955]: D77F876689: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=7.6, delays=0.6/0/0.04/7, dsn=2.5.0, status=sent (250 2.5.0 Ok, id=04680-01, DISCARD(bounce.suppressed))
May 5 02:17:50 isp postfix/qmgr[4402]: D77F876689: removed

till
5th May 2009, 15:33
Make sure that you allow also ipv6 connections from the ipv6 localhost IP network in the mynetwork setting in main.cf and not just from the ipv4 127.0.0.1 network.

reason8
5th May 2009, 20:52
Make sure that you allow also ipv6 connections from the ipv6 localhost IP network in the mynetwork setting in main.cf and not just from the ipv4 127.0.0.1 network.

Where do I add this in /etc/postfix/main.cf?

falko
6th May 2009, 22:46
Run
postconf -e 'mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128'
/etc/init.d/postfix restart

reason8
10th May 2009, 01:03
Run
postconf -e 'mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128'
/etc/init.d/postfix restart

What is this supposed to do again? I dont see a thread related it your answer.

falko
10th May 2009, 19:22
http://www.howtoforge.com/forums/showpost.php?p=186233&postcount=19

reason8
11th May 2009, 01:04
Ok. I already added this previously. It solved the problem of squirrel mail giving me relay errors but I am still having a problem receiving email from my ISPC3 server.

falko
11th May 2009, 14:37
but I am still having a problem receiving email from my ISPC3 server.What's in the mail log when this happens?