Postfix: lost connection after CONNECT from host - postfix-mta

I'm trying to connect to a postfix server from roundcube in another host (all in LAN).
I get always a "lost connection after CONNECT from myhost".
This is my full log:
tail -f /var/log/mail.log
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: initializing the server-side TLS engine
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: connect from ns1.domainexample.com[10.0.0.10]
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: smtp_stream_setup: maxtime=300 enable_deadline=0
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostname: smtpd_client_event_limit_exceptions: ns1.domainexample.com ~? 127.0.0.0/8
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? 127.0.0.0/8
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostname: smtpd_client_event_limit_exceptions: ns1.domainexample.com ~? [::ffff:127.0.0.0]/104
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? [::ffff:127.0.0.0]/104
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostname: smtpd_client_event_limit_exceptions: ns1.domainexample.com ~? [::1]/128
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? [::1]/128
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostname: smtpd_client_event_limit_exceptions: ns1.domainexample.com ~? 10.0.0.0/8
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? 10.0.0.0/8
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: > ns1.domainexample.com[10.0.0.10]: 220 domainexample.com ESMTP Postfix (Debian/GNU)
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: watchdog_pat: 0x55bacd1b1500
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: vstream_fflush_some: fd 19 flush 41
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: smtp_get: EOF
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostname: smtpd_client_event_limit_exceptions: ns1.domainexample.com ~? 127.0.0.0/8
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? 127.0.0.0/8
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostname: smtpd_client_event_limit_exceptions: ns1.domainexample.com ~? [::ffff:127.0.0.0]/104
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? [::ffff:127.0.0.0]/104
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostname: smtpd_client_event_limit_exceptions: ns1.domainexample.com ~? [::1]/128
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? [::1]/128
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostname: smtpd_client_event_limit_exceptions: ns1.domainexample.com ~? 10.0.0.0/8
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? 10.0.0.0/8
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: lost connection after CONNECT from ns1.domainexample.com[10.0.0.10]
Jan 28 11:49:46 domainexample postfix/smtpd[4796]: disconnect from ns1.domainexample.com[10.0.0.10] commands=0/0
Always after match with "match_hostaddr: smtpd_client_event_limit_exceptions: 10.0.0.10 ~? 10.0.0.0/8"
This is my config:
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
debug_peer_level = 3
debug_peer_list = 10.0.0.10
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = mail.domainexample.com, domainexample.com, mail.domainexample.com, localhost.domainexample.com, localhost
myhostname = domainexample.com
mynetworks = 127.0.0.0/8 10.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = 10.0.0.0/8
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_loglevel = 3
smtpd_tls_security_level = may
virtual_alias_maps = hash:/etc/postfix/virtual
If I connect since the roundcube host, I can do it without problems (by CLI):
openssl s_client -starttls smtp -crlf -connect mail.domainexample.com 25
Trying 10.20.30.10...
Connected to mail.domainexample.com.
Escape character is '^]'.
220 domainexample.com ESMTP Postfix (Debian/GNU)
EHLO domainexample.com
250-domainexample.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
MAIL FROM: admin#domainexample.com
250 2.1.0 Ok
RCPT TO: admin#domainexample.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Hellooooo!!!!
.
250 2.0.0 Ok: queued as 0AE20FF6B0
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
But when I connect sind the roundcube page, occur the "lost connection after CONNECT from myhost".
I'm really stuck at this point...
What I'm wrong?
Thanks for help
P.S.: I've tried deleting this message and creating it on serverfault (because I think it's better than here), but couldn't (serverfault says it might be spam, though I deleted this message here).

Try to send a complete mail message, so not just Hellooooo!!!, I think because of the missing from and to, your message is not send.
From: "Admin" <admin#domainexample.com>
To: "Admin" <admin#domainexample.com>
Subject: test message sent from manual telnet session
With the headers set, we now add one blank line with a carriage return/line feed (just press enter twice) and then we start the actual body of the message.
Hello World
.
note the . at the end, Postfix should respond with:
250 2.6.0 message received

Related

Gremlin group all returned edges with its vertices

I am a beginner in gremlin with Tinker pop. I have a graph where a cuisine has multiple inE("serves") from restaurants:
From these restaurants, I want only two restaurants which have location "Karachi".
These are:
For this, I've written the query and it works fine:
g.V(26).as("cui").inE("serves").outV().hasLabel("restaurant").has("location", "karachi").as("rest")
What I want is a gremlin query that gets the inE("reviews") of these restaurants and shape the data in this way.
[
"restaurant" : // info related to restaurant,
"reviews": [{array of reviews}]
]
I've tried this script:
g.V(26).as("cui").inE("serves").outV().hasLabel("restaurant").has("location", "karachi").as("rest").where(__.inE("review").has("value",is(gte(2)))).inE("review").order().by("value", desc).as("rev").select("rest","rev").by(elementMap())
But it returns an array of data for every rating in this structure:
["rest": {}, "rating:" {}],
["rest": {}, "rating:" {}],
==>{rest={id=54, label=restaurant, name=restaurant5, location=karachi}, rev={id=67, label=review, IN={id=54, label=restaurant}, OUT={id=9, label=user}, upvotes=3, rated_at=Tue Nov 16 22:13:58 PKT 2021, downvotes=1, value=12}}
==>{rest={id=60, label=restaurant, name=restaurant7, location=karachi}, rev={id=69, label=review, IN={id=60, label=restaurant}, OUT={id=6, label=user}, upvotes=4, rated_at=Tue Nov 16 22:16:45 PKT 2021, downvotes=3, value=5}}
==>{rest={id=60, label=restaurant, name=restaurant7, location=karachi}, rev={id=71, label=review, IN={id=60, label=restaurant}, OUT={id=9, label=user}, upvotes=1, rated_at=Tue Nov 16 22:16:45 PKT 2021, downvotes=5, value=5}}
==>{rest={id=12, label=restaurant, name=restaurant1, location=karachi}, rev={id=41, label=review, IN={id=12, label=restaurant}, OUT={id=0, label=user}, upvotes=8, rated_at=Tue Nov 16 21:49:07 PKT 2021, downvotes=4, value=4}}
==>{rest={id=54, label=restaurant, name=restaurant5, location=karachi}, rev={id=65, label=review, IN={id=54, label=restaurant}, OUT={id=6, label=user}, upvotes=4, rated_at=Tue Nov 16 22:12:57 PKT 2021, downvotes=1, value=4}}
==>{rest={id=12, label=restaurant, name=restaurant1, location=karachi}, rev={id=40, label=review, IN={id=12, label=restaurant}, OUT={id=3, label=user}, upvotes=8, rated_at=Tue Nov 16 21:49:07 PKT 2021, downvotes=4, value=3.7}}
==>{rest={id=60, label=restaurant, name=restaurant7, location=karachi}, rev={id=70, label=review, IN={id=60, label=restaurant}, OUT={id=0, label=user}, upvotes=5, rated_at=Tue Nov 16 22:16:45 PKT 2021, downvotes=2, value=3}}
==>{rest={id=54, label=restaurant, name=restaurant5, location=karachi}, rev={id=68, label=review, IN={id=54, label=restaurant}, OUT={id=3, label=user}, upvotes=2, rated_at=Tue Nov 16 22:14:21 PKT 2021, downvotes=9, value=3}}
==>{rest={id=60, label=restaurant, name=restaurant7, location=karachi}, rev={id=72, label=review, IN={id=60, label=restaurant}, OUT={id=3, label=user}, upvotes=5, rated_at=Tue Nov 16 22:16:46 PKT 2021, downvotes=1, value=2}}
==>{rest={id=54, label=restaurant, name=restaurant5, location=karachi}, rev={id=66, label=review, IN={id=54, label=restaurant}, OUT={id=0, label=user}, upvotes=4.7, rated_at=Tue Nov 16 22:13:32 PKT 2021, downvotes=3, value=2}}
How can I achieve this?
Thanks in advance.
You should look at using the project() step (documentation here) to get this sort of information. Without the steps to reproduce your graph, it is hard to give you the exact query, but it should look similar to the query below:
g.V(26).as("cui").
inE("serves").
outV().
hasLabel("restaurant").
has("location", "karachi").
project('restaurant', 'reviews').
by(elementMap()).
by(
inE("review").
has('value', gte(2)).
order().by("value", desc).
fold())

Postfix spf - delivers spoofing emails. Not fail

I started receiving spoofing emails. So I set up my server and domain but I still receive emails. SPF is not rejecting emails.
Can anyone help?
dns records
myserver.com. IN TXT "v=spf1 a mx a:myserver.com ip4:50.111.111.111 -all"
_dmarc.myserver.com. IN TXT "v=DMARC1; p=reject; fo=1; ri=3600; pct=100; rua=mailto:info#myserver.com; ruf=mailto:info#myserver.com
/etc/postfix-policyd-spf-python/policyd-spf.conf
debugLevel = 1
HELO_reject = Fail
Mail_From_reject = Fail
PermError_reject = False
TempError_Defer = False
skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1
postfix - main.cnf
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination unix check_policy_service: private / policyd-SPF reject_unauth_pipelining, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_recipient_domain, reject_rbl_client zen.spamhaus.org, bl.spamcop.net reject_rbl_client, check_policy_service inet: 127.0.0.1: 10023
postfix - master.cf
policyd-spf unix - n n - 0 spawn
user = policyd-spf argv = /usr/bin/policyd-spf
mail.log
Oct 12 21:13:36 myserver policyd-spf [26371]: None; identity = helo; client-ip = 72,167,234,237; helo = p3nlsmtp12.shr.prod.phx3.secureserver.net; envelope-from=test#baddkim.com; receiver=mymail#myserver.com
Oct 12 21:13:36 myserver policyd-spf [26371]: None; identity = mailfrom; client-ip = 72,167,234,237; helo = p3nlsmtp12.shr.prod.phx3.secureserver.net; envelope-from=test#baddkim.com; receiver=mymail#myserver.com
Oct 12 21:13:36 myserver policyd-spf [26369]: Pass; identity = mailfrom; client-ip = 72,167,234,237; helo = p3nlsmtp12.shr.prod.phx3.secureserver.net; envelope-from=test#emailspooftest.com; receiver=mymail#myserver.com
Oct 12 21:13:36 myserver postfix / smtpd [22955]: BFA1981347: client = p3nlsmtp12.shr.prod.phx3.secureserver.net [72.167.234.237]
Oct 12 21:13:36 myserver postgrey [2322]: action = pass, reason = triplet found, client_name = p3nlsmtp12.shr.prod.phx3.secureserver.net, client_address = 72.167.234.237, sender=test#baddkim.com, recipient=mymail#myserver.com
Oct 12 21:13:36 myserver postfix / smtpd [26363]: C1ADE814FA: client = p3nlsmtp12.shr.prod.phx3.secureserver.net [72.167.234.237]
Oct 12 21:13:36 myserver postgrey [2322]: action = pass, reason = triplet found, client_name = p3nlsmtp12.shr.prod.phx3.secureserver.net, client_address = 72.167.234.237, sender=test#emailspooftest.com, recipient=mymail#myserver.com

Error while creating volume in openstack

I installed devstack of openstack.
When I login using admin user and create a volume. It shows error as a status.
I got following in error log (syslog file). But couldn't find any resolution by google. What's wrong happening with this.
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00mConnectionFailedError: HTTPConnectionPool(host='192.168.43.88', port=2379): Max retries exceeded with url: /v3alpha/lease/grant (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4b75d3c110>: Failed to establish a new connection: [Errno 101] ENETUNREACH',))
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: #033[00;32mDEBUG oslo_concurrency.lockutils [#033[01;36mNone req-a2a87ca1-802a-4e3d-abe9-e28601906c44 #033[00;36mNone None#033[00;32m] #033[01;35m#033[00;32mAcquired semaphore "singleton_lock"#033[00m #033[00;33m{{(pid=3263) lock /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:212}}#033[00m
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: #033[00;32mDEBUG oslo_concurrency.lockutils [#033[01;36mNone req-a2a87ca1-802a-4e3d-abe9-e28601906c44 #033[00;36mNone None#033[00;32m] #033[01;35m#033[00;32mReleasing semaphore "singleton_lock"#033[00m #033[00;33m{{(pid=3263) lock /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:228}}#033[00m
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: #033[00;36mINFO oslo_service.service [#033[01;36mNone req-a2a87ca1-802a-4e3d-abe9-e28601906c44 #033[00;36mNone None#033[00;36m] #033[01;35m#033[00;36mChild 3263 exited with status 1#033[00m
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: #033[00;32mDEBUG oslo_service.service [#033[01;36mNone req-a2a87ca1-802a-4e3d-abe9-e28601906c44 #033[00;36mNone None#033[00;32m] #033[01;35m#033[00;32mStarted child 3264#033[00m #033[00;33m{{(pid=707) _start_child /usr/local/lib/python2.7/dist-packages/oslo_service/service.py:577}}#033[00m
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: #033[00;36mINFO cinder.service [#033[00;36m-#033[00;36m] #033[01;35m#033[00;36mStarting cinder-volume node (version 13.0.0)#033[00m
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: #033[01;31mERROR oslo_service.service [#033[00;36m-#033[01;31m] #033[01;35m#033[01;31mError starting thread.#033[00m: ConnectionFailedError: HTTPConnectionPool(host='192.168.43.88', port=2379): Max retries exceeded with url: /v3alpha/lease/grant (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4b75d3c110>: Failed to establish a new connection: [Errno 101] ENETUNREACH',))
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00mTraceback (most recent call last):
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m File "/usr/local/lib/python2.7/dist-packages/oslo_service/service.py", line 792, in run_service
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m service.start()
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m File "/opt/stack/cinder/cinder/service.py", line 219, in start
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m coordination.COORDINATOR.start()
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m File "/opt/stack/cinder/cinder/coordination.py", line 67, in start
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m self.coordinator.start(start_heart=True)
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m File "/usr/local/lib/python2.7/dist-packages/tooz/coordination.py", line 687, in start
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m super(CoordinationDriverWithExecutor, self).start(start_heart)
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m File "/usr/local/lib/python2.7/dist-packages/tooz/coordination.py", line 423, in start
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m self._start()
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m File "/usr/local/lib/python2.7/dist-packages/tooz/drivers/etcd3gw.py", line 196, in _start
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m self._membership_lease = self.client.lease(self.membership_timeout)
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m File "/usr/local/lib/python2.7/dist-packages/etcd3gw/client.py", line 115, in lease
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m json={"TTL": ttl, "ID": 0})
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m File "/usr/local/lib/python2.7/dist-packages/etcd3gw/client.py", line 88, in post
Jun 21 13:29:08 krishna-Lenovo-G550 cinder-volume[707]: ERROR oslo_service.service #033[01;35m#033[00m raise exceptions.ConnectionFailedError(six.text_type(ex))
I have ubuntu 18.04 LTS boot from 64 gb USB.
Volume size is -> 1 GB.
Volume type is -> lvmdriver-1.
Volume source is -> No source, empty volume
As per following reference.
https://ask.openstack.org/en/question/51180/error-connectionerror-httpconnectionpoolhostopenstack-port8774-max-retries-exceeded-with-url-v24ca42a660b0c4ff48db51d3187215dd4imagesdetail-caused-by/
following command.
sudo nova-manage service list
gives following.
/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
""")
usage: nova-manage [-h] [--remote_debug-host REMOTE_DEBUG_HOST]
[--remote_debug-port REMOTE_DEBUG_PORT] [--config-dir DIR]
[--config-file PATH] [--debug] [--log-config-append PATH]
[--log-date-format DATE_FORMAT] [--log-dir LOG_DIR]
[--log-file PATH] [--nodebug] [--nopost-mortem]
[--nouse-journal] [--nouse-json] [--nouse-syslog]
[--nowatch-log-file] [--post-mortem]
[--syslog-log-facility SYSLOG_LOG_FACILITY] [--use-journal]
[--use-json] [--use-syslog] [--version] [--watch-log-file]
{version,bash-completion,placement,network,cell_v2,db,cell,floating,api_db}
...
nova-manage: error: argument category: invalid choice: 'service' (choose from 'version', 'bash-completion', 'placement', 'network', 'cell_v2', 'db', 'cell', 'floating', 'api_db')
Following command:
sudo rabbitmqctl status
gives following:
Status of node 'rabbit#krishna-Lenovo-G550'
[{pid,1851},
{running_applications,
[{rabbit,"RabbitMQ","3.6.10"},
{ranch,"Socket acceptor pool for TCP protocols.","1.3.0"},
{ssl,"Erlang/OTP SSL application","8.2.3"},
{public_key,"Public key infrastructure","1.5.2"},
{asn1,"The Erlang ASN1 compiler version 5.0.4","5.0.4"},
{crypto,"CRYPTO","4.2"},
{rabbit_common,
"Modules shared by rabbitmq-server and rabbitmq-erlang-client",
"3.6.10"},
{compiler,"ERTS CXC 138 10","7.1.4"},
{xmerl,"XML parser","1.3.16"},
{os_mon,"CPO CXC 138 46","2.4.4"},
{mnesia,"MNESIA CXC 138 12","4.15.3"},
{syntax_tools,"Syntax tools","2.1.4"},
{sasl,"SASL CXC 138 11","3.1.1"},
{stdlib,"ERTS CXC 138 10","3.4.3"},
{kernel,"ERTS CXC 138 10","5.4.1"}]},
{os,{unix,linux}},
{erlang_version,
"Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:64] [kernel-poll:true]\n"},
{memory,
[{total,127617792},
{connection_readers,813376},
{connection_writers,57704},
{connection_channels,182760},
{connection_other,1578088},
{queue_procs,747128},
{queue_slave_procs,0},
{plugins,0},
{other_proc,17494600},
{mnesia,173768},
{metrics,271752},
{mgmt_db,0},
{msg_index,58592},
{other_ets,1914184},
{binary,73692752},
{code,21401226},
{atom,900041},
{other_system,8600765}]},
{alarms,[]},
{listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,3317874688},
{disk_free_limit,50000000},
{disk_free,44431437824},
{file_descriptors,
[{total_limit,65436},
{total_used,30},
{sockets_limit,58890},
{sockets_used,28}]},
{processes,[{limit,1048576},{used,549}]},
{run_queue,0},
{uptime,5312},
{kernel,{net_ticktime,60}}]
If you want to check the nova services status the command is:
Using openstack CLI:
openstack compute service list
Using nova CLI:
nova service-list

postfix disable bounce for transport

I have postfix with different transport. For one of these transports I want to disable message bounce.
master.cf
smtp inet n - n - - smtpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
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
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
-o smtp_fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
retry 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
scache unix - - n - 1 scache
dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/libexec/dovecot/deliver -d $(recipient)
emailtransport unix - n n - - pipe
flags=X user=transpostfix argv=/media/raid1m/mailparse/emailtransport.php
#****** other options ************
other2emailtransport unix - n n - - pipe
flags=X user=other2transpostfix argv=/media/raid1m/mailparse/other2emailtransport.php
log output:
Mar 26 15:35:14 machin1 postfix/smtpd[12110]: connect from client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:14 machin1 postfix/smtpd[12125]: connect from client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:14 machin1 postfix/pipe[3893]: 0738C180997: to=<transpostfix#localhost.localhost>, orig_to=<zauri.t#ass.exemple.com.domain>, relay=emailtransport, delay=0.5, delays=0.07/0/0/0.42, dsn=2.0.0, status=sent (delivered via emailtransport service)
Mar 26 15:35:14 machin1 postfix/qmgr[12106]: 0738C180997: removed
Mar 26 15:35:14 machin1 postfix/smtpd[12110]: setting up TLS connection from client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:14 machin1 postfix/smtpd[12125]: CC0FF180996: client=client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:14 machin1 postfix/smtpd[21657]: disconnect from client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:14 machin1 postfix/smtpd[12110]: Anonymous TLS connection established from client=68.ip-11-11-10.eu[11.12.13.14]: TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)
Mar 26 15:35:15 machin1 postfix/smtpd[12224]: 1662E180997: client=client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:15 machin1 postfix/cleanup[20853]: CC0FF180996: message-id=<a779c13adb0ff35fc576b6a9a3a779c7#async.clubggff.com>
Mar 26 15:35:15 machin1 postfix/qmgr[12106]: CC0FF180996: from=<notification+kjdkjivh3i_d#example-mail.com>, size=16051, nrcpt=1 (queue active)
Mar 26 15:35:15 machin1 postfix/smtpd[12110]: 6873F180998: client=client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:15 machin1 postfix/cleanup[21196]: 1662E180997: message-id=<cb01d448de2987547cd69fcab1e92f92#async.clubggff.com>
Mar 26 15:35:15 machin1 postfix/pipe[6928]: CC0FF180996: to=<transpostfix#localhost.localhost>, orig_to=<s01064154705#add3000.exemple.com.domain>, relay=emailtransport, delay=0.97, delays=0.55/0/0/0.42, dsn=2.0.0, status=sent (delivered via emailtransport service)
Mar 26 15:35:15 machin1 postfix/qmgr[12106]: CC0FF180996: removed
Mar 26 15:35:15 machin1 postfix/cleanup[21201]: 6873F180998: message-id=<1729890133889801-1540059429539540#groups.clubggff.com>
Mar 26 15:35:15 machin1 postfix/qmgr[12106]: 1662E180997: from=<notification+kjdkj5wd1k3_#example-mail.com>, size=18421, nrcpt=1 (queue active)
Mar 26 15:35:15 machin1 postfix/qmgr[12106]: 6873F180998: from=<notification+kjdkpj3hdv5d#example-mail.com>, size=24947, nrcpt=1 (queue active)
Mar 26 15:35:16 machin1 postfix/pipe[6941]: 1662E180997: to=<transpostfix#localhost.localhost>, orig_to=<margaretgarza#add3000.exemple.com.domain>, relay=emailtransport, delay=1.4, delays=0.95/0/0/0.41, dsn=2.0.0, status=sent (delivered via emailtransport service)
Mar 26 15:35:16 machin1 postfix/qmgr[12106]: 1662E180997: removed
Mar 26 15:35:16 machin1 postfix/smtpd[12154]: NOQUEUE: reject: RCPT from client=68.ip-11-11-10.eu[11.12.13.14]: 504 5.5.2 <164.132.109.68>: Helo command rejected: need fully-qualified hostname; from=<mbeuwen#sfilc.com> to=<t120304677#yahoo.com.tw> proto=SMTP helo=<164.132.109.68>
Mar 26 15:35:16 machin1 postfix/smtpd[12130]: disconnect from client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:16 machin1 postfix/smtpd[12157]: connect from client=68.ip-11-11-10.eu[11.12.13.14]
Mar 26 15:35:16 machin1 postfix/pipe[6938]: 6873F180998: to=<transpostfix#localhost.localhost>, orig_to=<fgbdfscxw#my-dom.exemple.com.domain>, relay=emailtransport, delay=1, delays=0.58/0/0/0.47, dsn=5.3.0, status=bounced (Command died with status 255: "/media/raid1m/mailparse/emailtransport.php")
Mar 26 15:35:16 machin1 postfix/cleanup[22236]: 4FFE918099A: message-id=<20160326133516.4FFE918099A#1.444.exemple.com.domain>
Mar 26 15:35:16 machin1 postfix/bounce[10936]: 6873F180998: sender non-delivery notification: 4FFE918099A
Mar 26 15:35:16 machin1 postfix/qmgr[12106]: 4FFE918099A: from=<>, size=27004, nrcpt=1 (queue active)
Mar 26 15:35:16 machin1 postfix/qmgr[12106]: 6873F180998: removed
Mar 26 15:35:16 machin1 postfix/error[10938]: 4FFE918099A: to=<notification+kjdkpj3hdv5d#example-mail.com>, relay=none, delay=0.03, delays=0.01/0.01/0/0.01, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=delete-lev.exemple.com.domain type=A: Host not found)
I need disable bounce for emailtransport. Some time emailtransport.php give a mistake, but it's exactly does the job I want.
How to turn off any that bounce message to emailtransport and so that it did not affect the work or other transports such as other2emailtransport
I don't need this:
Mar 26 15:35:16 machin1 postfix/pipe[6938]: 6873F180998: to=<transpostfix#localhost.localhost>, orig_to=<fgbdfscxw#my-dom.exemple.com.domain>, relay=emailtransport, delay=1, delays=0.58/0/0/0.47, dsn=5.3.0, status=bounced (Command died with status 255: "/media/raid1m/mailparse/emailtransport.php")
Mar 26 15:35:16 machin1 postfix/cleanup[22236]: 4FFE918099A: message-id=<20160326133516.4FFE918099A#1.444.exemple.com.domain>
Mar 26 15:35:16 machin1 postfix/bounce[10936]: 6873F180998: sender non-delivery notification: 4FFE918099A
After Command died with status 255 I need delete message 6873F180998. And don't send bound message 4FFE918099A.
I solved my problem but it does not quite answer my question.
In the documentation is written: http://www.postfix.org/pipe.8.html
DIAGNOSTICS
Command exit status codes are expected to follow the conventions
defined in <sysexits.h>. Exit status 0 means normal successful comple-
tion.
In the case of a non-zero exit status, a limited amount of command out-
put is logged, and reported in a delivery status notification. When
the output begins with a 4.X.X or 5.X.X enhanced status code, the sta-
tus code takes precedence over the non-zero exit status (Postfix ver-
sion 2.3 and later).
This means I need to have my PHP script gave out EXIT(0); I turned on the reporting of errors ini_set('error_reporting', -1); and found a problem in script. when I repaired this script error disappeared and the issue resolved.
Other theoretical options to think how to solve the problem (but I'm unsure if this is possible):
Disable for special postfix transport use bounce
Always rewrite error status PHP script to 0
edit something in sysexits.h

Postfix not receiving mail

I setup my Virtualmin using the manual installation because I'm on Ubuntu 3.14 and the automatic install does not support this version.
Because of this now I have problems. Everything works except Postfix.
Here is my postconf -n:
ubuntu#web01:~$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_size_limit = 0
mydestination = web01.redacted.net, localhost, localhost.localdomain, localhost
myhostname = web01.redacted.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_inet_interfaces
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual
The error I get in the mail.log is:
Mar 22 08:17:49 web01 postfix/smtpd[27725]: connect from nk11p04mm-asmtpout002.mac.com[17.158.236.237]
Mar 22 08:17:50 web01 postfix/smtpd[27725]: 3ADDE65113: client=nk11p04mm-asmtpout002.mac.com[17.158.236.237]
Mar 22 08:17:50 web01 postfix/cleanup[27729]: 3ADDE65113: message-id=<4FD40961-2187-4B2C-8892-8A7A3BADD07E#icloud.com>
Mar 22 08:17:50 web01 postfix/qmgr[1263]: 3ADDE65113: from=<redacted#icloud.com>, size=1941, nrcpt=1 (queue active)
Mar 22 08:17:50 web01 postfix/error[27730]: 3ADDE65113: to=<redactedName#redacted.co>, orig_to=<hostmaster#redacted.co>, relay=none, delay=0.23, delays=0.2/0.01/0/0.02, dsn=5.1.1, status=bounced (User unknown in virtual alias table)
Mar 22 08:17:50 web01 postfix/cleanup[27729]: 7083565115: message-id=<20140322081750.7083565115#web01.redacted.net>
And this is the /etc/postfix/virtual:
redacted.co redacted.co
hostmaster#redacted.co redactedName#redacted.co
Here is the /etc/aliases:
# See man 5 aliases for format
postmaster: root
The problem was that the initial user in our case redactedName was not found. To solve this problem the user was manually added as per:
redacted.co redacted.co
hostmaster#redacted.co redactedName#redacted.co
redactedName#redacted.co redactedName
This fixed the problem.
I hope someone else finds this useful. It took a lot of debugging and looking at logs to finally understand what the error message was telling me was in fact the error itself. Basically the redactedName#redacted.co was not being redirected to any user.

Resources