Problems with Postfix (+Cyrus)

Hey everyone,
yesterday I tried to set up Postfix as MTA.
It almost drove me crazy because I could not receive mails.

here is a sample from my mail log:

Mar 17 14:16:06 h2106059 postfix/postfix-script[30587]: stopping the Postfix mail system
Mar 17 14:16:06 h2106059 postfix/master[11669]: terminating on signal 15
Mar 17 14:16:07 h2106059 postfix/postfix-script[30765]: starting the Postfix mail system
Mar 17 14:16:07 h2106059 postfix/master[30767]: daemon started – version 2.8.11, configuration /etc/postfix
Mar 17 14:16:17 h2106059 postfix/smtpd[32548]: connect from mail-bk0-f51.google.com[209.85.214.51]
Mar 17 14:16:18 h2106059 postfix/smtpd[32548]: NOQUEUE: reject: RCPT from mail-bk0-f51.google.com[209.85.214.51]: 554 5.7.1 <mail@host.de>: Relay access denied; from=<jan@googlemail.com> to=<mail@host.de> proto=ESMTP helo=<mail-bk0-f51.google.com>
Mar 17 14:16:18 h2106059 postfix/smtpd[32548]: disconnect from mail-bk0-f51.google.com[209.85.214.51]

this is my main.cf:

alias_maps =
biff = no
broken_sasl_auth_clients = yes
canonical_maps =
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter =
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
defer_transports =
delay_warning_time = 0h
disable_dns_lookups = no
disable_mime_output_conversion = no
disable_vrfy_command = yes
fallback_transport = cyrus
home_mailbox = Mailbox
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions =
message_size_limit = 0
message_strip_characters =
mydestination = mydomain, localhost, $myhostname, localhost.$mydomain
mydomain = visitor-relationship-management.de
myhostname = localhost
mynetworks = 127.0.0.0/8 85.214.223.208/32
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_clientcerts =
relay_domains = $mydestination
relayhost =
relocated_maps =
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps =
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_enforce_tls = no
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps =
smtp_tls_CAfile =
smtp_tls_CApath =
smtp_tls_cert_file =
smtp_tls_key_file =
smtp_tls_session_cache_database =
smtp_use_tls = no
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions =
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_non_fqdn_hostname, reject_invalid_hostname, reject_rhsbl_client rhsbl.sorbs.net, reject_rhsbl_sender rhsbl.sorbs.net, reject_rbl_client opm.blitzed.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client relays.ordb.org, reject_rbl_client list.dsbl.org, reject_rbl_client sbl.spamhaus.org, reject_rbl_client unconfirmed.dsbl.org, reject_rbl_client list.dsbl.org, reject_rbl_client dynablock.njabl.org, reject_rbl_client dialup.blacklist.jippg.org, reject_rbl_client opm.blitzed.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client multihop.dsbl.org, reject_rbl_client dialup.rbl.kropka.net, reject_unauth_pipelining
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_rhsbl_client rhsbl.sorbs.net, reject_rhsbl_sender rhsbl.sorbs.net, reject_rbl_client relays.ordb.org, reject_rbl_client list.dsbl.org, reject_rbl_client sbl.spamhaus.org, reject_rbl_client unconfirmed.dsbl.org, reject_rbl_client list.dsbl.org, reject_rbl_client dynablock.njabl.org, reject_rbl_client dialup.blacklist.jippg.org, reject_rbl_client multihop.dsbl.org, reject_rbl_client dialup.rbl.kropka.net, reject_rbl_client opm.blitzed.org, reject_rbl_client cbl.abuseat.org, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_pipelining
smtpd_tls_CAfile =
smtpd_tls_CApath =
smtpd_tls_ask_ccert = no
smtpd_tls_cert_file =
smtpd_tls_key_file =
smtpd_tls_received_header = no
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps =
unknown_local_recipient_reject_code = 550
virtual_alias_domains =

I really don’t know what to do, I’m new with postfix and really desperate right now.
Somehow I managed to make this error disappeare but sadly I cant remember how.
But after this error was gone, there was a second problem which kept the mails away from my server.

Is ther somebody who can help me a little bit?

Thank you very much.
Greetings,
Jan

Hi Jan, welcome

Just wondering, since I’ve seen a lot of posts where people were working on Postfix because they thought they needed it to receive/send emails through ordinary ISP-accounts, Gmail etc. Are you really needing a mailserver of your own?

Question: does it work with the firewall off?

Hi,
yes sadly I need my own server.
The “jan@gmail.com” is just the mail I tried to send a mail to the server I wanted to test.

No It neither works.

It has to be a fault in the postfix main.cf yesterday I managed it to get rid of the “NOQUEUE: reject: RCPT” error but now restarted with a new main.cf and got the error again.

Ok,
I solved it.

The mistake was a missing “$” in:

mydestination = mydomain, localhost, $myhostname, localhost.$mydomain

Thank you anyway.

You do not appear to have configured Postfix. There are no queues for incoming mail, because you have not defined any. This on a large system would be done in a database, and on a smaller system in tables (maps) in /etc/postfix. I also cannot see any transports defined for outbound messages. The main role of main.cf is to provide a list of these tables that define the rules for checking, accepting and sending messages. You do not have any defined. It is not just main.cf and master.cf, but the other files in /etc/postfix that require configuration for a functional mail server. Have you read any of The Postfix Home Page ?

For a ssimple system (where the mail users all have accounts in /etc/passwd or somesuch, put your user aliases in /etc/postfix virtual, create a database with postmap, and put this in main.cf


virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_maps = hash:/etc/postfix/virtual

This is ridiculous. You have to explain exactly what you you are trying to achieve before you can expect useful answers. I think you need to read a bit, or go t a class, set things up as best you can, and then come back with specific questions about stuff you do not understand.

It looks from your IP address as if you are renting or co-locating a server. Hosting providers normally provide preconfigured/managed mail servers that you can set up and manage users with a web form. I really do not think that managing a public mail server is for the casual hobbyist. If you want to learn you should set up a local server, then add a SMTP feed to and from your ISP… That is how a lot of small businesses operate.

hi eng-int,

thank you for your answer.
You are right, I’m new to this subject and its my second day I’m in contact with postfix.
This is my first attempt to set up a tiny mail server and in order to do this I wanted to keep things as simple as I could. So that I understand what I did.

I just need one User with one Mailbox why should I do it the complicated way? Are there any advantages?

Greetings,
Jan

On 2013-03-17 14:46, kafkasgregor wrote:
>
> Hey everyone,
> yesterday I tried to set up Postfix as MTA.
> It almost drove me crazy because I could not receive mails.

Please use code tags for printouts and commands. Advanced editor, ‘#’
button.
Posting in
Code Tags - A Guide


>> Mar 17 14:16:17 h2106059 postfix/smtpd[32548]: connect from mail-bk0-f51.google.com[209.85.214.51]
>> Mar 17 14:16:18 h2106059 postfix/smtpd[32548]: NOQUEUE: reject: RCPT from mail-bk0-f51.google.com[209.85.214.51]: 554 5.7.1 <mail@host.de>: Relay access denied; from=<jan@googlemail.com> to=<mail@host.de> proto=ESMTP helo=<mail-bk0-f51.google.com>
>> Mar 17 14:16:18 h2106059 postfix/smtpd[32548]: disconnect from mail-bk0-f51.google.com[209.85.214.51]

I think that your own postfix does not recognize “@host.de” as your own
domain.

I think you solved that part on your own.

> I really don’t know what to do, I’m new with postfix and really
> desperate right now.

You should read instructions at “www.postfix.org/”, there are examples
and FAQs. You also have local documentation at
“/usr/share/doc/packages/postfix/postfix-doc” - if you install the
package “postfix-doc”.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 2013-03-17 17:36, kafkasgregor wrote:
> I just need one User with one Mailbox why should I do it the
> complicated way? Are there any advantages?

No.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)