Comments (11)
Oh also not to clog up your issues inbox any more:
When I connect my Wordpress emailing functionality what settings do I use.
I opened the Dockerfile and saw 25 is exposed, so I assume I would connect to port 25, but how would I set the SMTP server address given I won't be exposing that port publicly? Is it just setup so that when I email smtp.awesomesite.com that the DNS setting I assume I made resolves to my box's IP, and then docker somhow knows that it can resolve it via the private docker network that isn't exposed? Or do I need to inject a hosts record with the IP of the relay box pointed at by smtp.awesomesite.com?
Cheers again!
from postfix-relay.
Hi!, for myhostname
i don't think it is that important. But maybe good that it resolves to the source IP which will be used when connecting to other SMTP server when sending mail. What might be more important now a days is to setup SPF records for your domain.
For how to connect to the SMTP relay i would strongly suggest you use docker networks somehow. Simples is probably to use one docker-compose config that has both a wordpress and postfix-relay service as then docker-compose will create a "default" network between them so they can communicate. Then wordpress should be able to reach the SMTP relay using normal DNS. For example if you have "smtp" service then wordpress should be able to use "smtp" as hostname for it's SMTP server. See https://github.com/wader/postfix-relay#using-docker-compose
from postfix-relay.
Ok I've managed to get it going, now its just tinkerin with all the nobs to get out of that spam box!
This is the big issue I have currently (source: https://www.mail-tester.com/test-qhuyo):
We check if there is a server (A Record) behind your hostname hostname.
You may want to publish a DNS record (A type) for the hostname hostname or use a different hostname in your mail software.
you can also see the raw email:
Received: by mail-tester.com (Postfix, from userid 500)
id 3AE9CA04BF; Thu, 29 Nov 2018 10:14:45 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail-tester.com
X-Spam-Level: ***
X-Spam-Status: No/3.0/5.0
X-Spam-Test-Scores: FSL_HELO_NON_FQDN_1=0.001,HTML_MESSAGE=0.001,
HTML_MIME_NO_HTML_TAG=0.635,MIME_HTML_ONLY=1.105,
RCVD_IN_SORBS_DUL=0.001,RDNS_NONE=1.274,SPF_PASS=-0.001,
URIBL_BLOCKED=0.001
X-Spam-Last-External-IP: 123.456.789.01
X-Spam-Last-External-HELO: hostname
X-Spam-Last-External-rDNS:
X-Spam-Date-of-Scan: Thu, 29 Nov 2018 10:14:45 +0100
X-Spam-Report:
* 0.0 FSL_HELO_NON_FQDN_1 No description available.
* 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was
* blocked. See
* http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
* for more information.
* [URIs: sendingemailfromhere.com.au]
* 0.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP
* address
* [123.456.789.01 listed in dnsbl.sorbs.net]
* -0.0 SPF_PASS SPF: sender matches SPF record
* 1.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
* 0.0 HTML_MESSAGE BODY: HTML included in message
* 0.6 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML
* tag
* 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=123.456.789.01; helo=hostname; [email protected]; [email protected]
DMARC-Filter: OpenDMARC Filter v1.3.1 mail-tester.com 81C199FE8B
Authentication-Results: mail-tester.com; dmarc=none header.from=sendingemailfromhere.com.au
Received: from hostname (unknown [123.456.789.01])
(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail-tester.com (Postfix) with ESMTPS id 81C199FE8B
for <[email protected]>; Thu, 29 Nov 2018 10:14:43 +0100 (CET)
Received: from wp.sendingemailfromhere.com.au (projectname-wordpress.projectname_default [172.21.0.5])
by hostname (Postfix) with ESMTP id 548CA23C585
for <[email protected]>; Thu, 29 Nov 2018 09:14:41 +0000 (UTC)
Date: Thu, 29 Nov 2018 09:14:41 +0000
To: [email protected]
From: WordPress <[email protected]>
Subject: Test email from https://wp.sendingemailfromhere.com.au
Message-ID: <[email protected]>
X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
MIME-Version: 1.0
Content-Type: text/html; charset=iso-8859-1
This test email proves that your WordPress installation at https://wp.sendingemailfromhere.com.au can send emails.\n\nSent: Thu, 29 Nov 2018 09:14:41 +0000
it looks like my helo is sending hostname not sendingemailfromhere.com.au
Here is my docker-compose config
smtp:
image: mwader/postfix-relay
restart: always
container_name: projectname-smtp
environment:
- POSTFIX_sendingemailfromhere.com.au=smtp.sendingemailfromhere.com.au
expose:
- "25"
Any idea on how to make the helo send sendingemailfromhere.com.au or smtp.sendingemailfromhere.com.au, which ever it's supposed to?
from postfix-relay.
I think POSTFIX_myhostname=smtp.sendingemailfromhere.com.au
should solve that. I'm quite sure it is what postfix will use at HELO.
You can probably skip expose 25 as it's already define by the Dockefile and i think expose is only needed if you use links (which you probably don't need if you use DNS instead)
from postfix-relay.
@wader The confusion I am experiencing is that the HELO is sending hostname as it's host name not sendingemailfromhere.com.au OR smtp.sendingemailfromhere.com.au
I'm not even 100% sure what it should be.
I will do some digging into postfix and how HELO works, if I find more info I will get back to you, or if you figure something out let me know.
from postfix-relay.
I just noticed POSTFIX_sendingemailfromhere.com.au=smtp.sendingemailfromhere.com.au in your example. Just to be clear, postfix has a config option named ”myhostname” so you should not expand it as a variable etc.
from postfix-relay.
from postfix-relay.
Aha good 👍 yeah that option is named a bit weirdly. So hostname works now?
from postfix-relay.
from postfix-relay.
Can close?
I did a change to make this more clear 840a28d Thanks for bringing this up!
from postfix-relay.
from postfix-relay.
Related Issues (20)
- permissions after restart HOT 1
- Relay access denied for 4lvl domain name HOT 2
- Open Relay (but restricted) HOT 2
- Local network issue HOT 11
- Question: How to view/enable logging HOT 3
- Random 454 4.7.1 Relay access denied, no logging for this error HOT 2
- Provide multi-platform Docker images HOT 5
- Container keeps stopping HOT 4
- MX error: host not found HOT 16
- Question: how to use Postfix hash: lookup table values? HOT 6
- Feature request: add rsyslogd include HOT 3
- opendkim is not running HOT 12
- [Feature Req] Authentication for clients using Relay HOT 2
- Unable to use image from Azure Portal HOT 5
- opendkim dkim HOT 34
- smtp relay with auth when client connect HOT 7
- DKIM header signature failure with Mailman 3. HOT 1
- Run as different user than root? HOT 3
- qshape tool not working HOT 6
- dkim issue after last update HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postfix-relay.