Comments (7)
Hi @GerrAlt12, I'm trying to reproduce but I need more information.
This is what I tried to match your usecase:
docker run --name mail -v "$(pwd)/postfix":/tmp/postfix -v "$(pwd)/spamassassin":/tmp/spamassassin -p "25:25" -p "143:143" -p "587:587" -p "993:993" -h mail.my-domain.com -ti tvial/docker-mailserver bash
root@mail:/# /bin/sh -c /usr/local/bin/start-mailserver.sh
Regenerating postfix 'vmailbox' and 'virtual' for given users
user 'user' for domain 'domain.tld' with password '********'
Postfix configurations
Fixing permissions
Creating /etc/mailname
Configuring Spamassassin
Starting daemons
* Starting enhanced syslogd rsyslogd [ OK ]
* Starting file alteration monitor FAM
...done.
* Starting saslauthd [ OK ]
* Starting Courier authentication services authdaemond [ OK ]
* Starting Courier IMAP server imapd [ OK ]
* Starting Courier IMAP-SSL server imapd-ssl [ OK ]
Starting SpamAssassin Mail Filter Daemon: spamd.
* Starting ClamAV daemon clamd
LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days! ***
LibClamAV Warning: *** Please update it as soon as possible. ***
LibClamAV Warning: **************************************************
[ OK ]
Starting amavisd: amavisd-new.
* Starting Postfix Mail Transport Agent postfix [ OK ]
Listing SASL users
[email protected]: userPassword
Starting...
Aug 25 22:13:46 mail amavis[553]: No decoder for .doc tried: ripole
Aug 25 22:13:46 mail amavis[553]: Found decoder for .cab at /usr/bin/cabextract
Aug 25 22:13:46 mail amavis[553]: No decoder for .tnef
Aug 25 22:13:46 mail amavis[553]: Internal decoder for .tnef
Aug 25 22:13:46 mail amavis[553]: Found decoder for .exe at /usr/bin/arj
Aug 25 22:13:46 mail amavis[553]: Using primary internal av scanner code for ClamAV-clamd
Aug 25 22:13:46 mail amavis[553]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Aug 25 22:13:46 mail amavis[553]: Deleting db files in /var/lib/amavis/db
Aug 25 22:13:46 mail amavis[553]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
Aug 25 22:13:46 mail postfix/master[655]: daemon started -- version 2.11.0, configuration /etc/postfix
Everything starts as expected.
And the telnet result:
➜ ~ telnet 192.168.59.103 25
Trying 192.168.59.103...
Connected to 192.168.59.103.
Escape character is '^]'.
220 mail.my-domain.com ESMTP Postfix (Ubuntu)
Again, it seems Ok.
Could you tell me more about that?
from docker-mailserver.
I have following log:
root@docker:~# /bin/sh -c /usr/local/bin/start-mailserver.sh
Regenerating postfix 'vmailbox' and 'virtual' for given users
sed: can't read /tmp/postfix/accounts.cf: No such file or directory
/usr/local/bin/start-mailserver.sh: 10: /usr/local/bin/start-mailserver.sh: cann ot open /tmp/postfix/accounts.cf: No such file
/etc/courier/userdb: not found.
cp: cannot stat '/tmp/postfix/virtual': No such file or directory
Postfix configurations
postmap: fatal: open /etc/postfix/virtual: No such file or directory
cat: /tmp/vhost.tmp: No such file or directory
rm: cannot remove '/tmp/vhost.tmp': No such file or directory
Fixing permissions
Creating /etc/mailname
Configuring Spamassassin
cp: cannot stat '/tmp/spamassassin/rules.cf': No such file or directory
Starting daemons
- Starting enhanced syslogd rsyslogd [ OK ]
- Starting file alteration monitor FAM
...done. - Starting saslauthd [ OK ]
- Starting Courier authentication services authdaemond [ OK ]
- Starting Courier IMAP server imapd [ OK ]
- Starting Courier IMAP-SSL server imapd-ssl [ OK ]
Starting SpamAssassin Mail Filter Daemon: spamd. - Starting ClamAV daemon clamd [ OK ]
Starting amavisd: changed ownership of '/var/run/amavis' from root:root to amavis:amavis
amavisd-new. - Starting Postfix Mail Transport Agent postfix [ OK ]
Listing SASL users
Starting...
Aug 26 05:23:52 docker amavis[1132]: No decoder for .doc tried: ripole
Aug 26 05:23:52 docker amavis[1132]: Found decoder for .cab at /usr/bin/cabextract
Aug 26 05:23:52 docker amavis[1132]: No decoder for .tnef
Aug 26 05:23:52 docker amavis[1132]: Internal decoder for .tnef
Aug 26 05:23:52 docker amavis[1132]: Found decoder for .exe at /usr/bin/arj
Aug 26 05:23:52 docker amavis[1132]: Using primary internal av scanner code for ClamAV-clamd
Aug 26 05:23:52 docker amavis[1132]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Aug 26 05:23:52 docker amavis[1132]: Deleting db files in /var/lib/amavis/db
Aug 26 05:23:52 docker amavis[1132]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
Aug 26 05:23:55 docker postfix/master[1226]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
Looks like docker run command does not execute correctly - no volume mounted
Maybe I can edit start-mailserver.sh script for correct volume mount?
from docker-mailserver.
Yep. I don't have your docker
command line to see if it's correct or not, but it seems that you don't mount the postfix/accounts.cf
to /tmp/postfix/accounts.cf
.
Have a look to the documentation to fix it.
You can also modify the start-mailserver.sh
script, but this image already does what you probably want to do.
I'll try to add a check in start-mailserver.sh
to die if the mandatory files are not found.
Let me know if it's ok.
from docker-mailserver.
Unfortunately now I don't see any way to run "docker run" exactly as you describe because I use Jelastic, and I can execute any commands only inside the container (Jelastic docs have no remarks about such possibilities).
Now I have script for create /tmp/postfix dir and add files accounts.cf, main.cf, master.cf from your examples located in this repo. I run this script from second line of start-mailserver.sh. Now I see only one error about Permission denaided - last line in my log.
from docker-mailserver.
I think I have issue with permissions on some lib or dir, I will check all permissions.
I think checking for mandatory files is nice idea, better execute all functionality correctly or perform no execution at all
from docker-mailserver.
Since your problem is related to your specific environment, I close this issue.
A added a check as proposed above for better understanding.
I'll let you know when the updated image will be available on the docker registry.
from docker-mailserver.
Done. You can now docker pull tvial/docker-mailserver
.
from docker-mailserver.
Related Issues (20)
- question: Why does my mail client show a certificate for an FQDN I do not know? HOT 10
- feature request: Does Docker Mailserver support the jmap protocol HOT 4
- fetchmail SMTP error "Sender address rejected: Domain not found" HOT 9
- bug report: forwarded emails are not sent via relay HOT 4
- Your DKIM signature is not valid - opendkim HOT 4
- bug report: `SSL_TYPE=none` should not disable STARTTLS for outbound SMTP connections HOT 8
- Sender dependent relay should NOT require RELAY_HOST env HOT 6
- question: Why does `SMTP_ONLY=1` still allow to receive mail locally? HOT 4
- bug report: [Windows] No difference after call to 'sed' in 'sedfile' HOT 3
- feature request: Support per-user SASL authentication when used as a relay HOT 3
- Question: How to merge 2 servers into 1? HOT 2
- other: Question lost connection after BDAT / DATA in postfix HOT 1
- How to send email by java-smpt/pop3,how to get auth-code HOT 1
- Userdb alias dummy accounts use wrong home directory HOT 2
- Feature request: Replace Redis HOT 4
- question: Why does LetsEncrypt certificate from `nginxproxy/acme-companion` fail to send mail with TLS? HOT 4
- [BUG]: Rspamd outright rejects a message instead of moving it to junk HOT 27
- bug report: I copied volumes to another system to migrate DMS but it fails to start properly HOT 4
- bug report: bad hostname or network address: 127.0.0.1:10025 HOT 3
- bug report: setup script alway fail with "setup email list" related on the user name HOT 5
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 docker-mailserver.