{"id":1362,"date":"2023-05-08T13:00:11","date_gmt":"2023-05-08T13:00:11","guid":{"rendered":"https:\/\/mklasen.com\/?p=1362"},"modified":"2023-05-08T13:00:17","modified_gmt":"2023-05-08T13:00:17","slug":"setup-mailcrab-in-docker-php","status":"publish","type":"post","link":"https:\/\/mklasen.com\/setup-mailcrab-in-docker-php\/","title":{"rendered":"Setup Mailcrab in Docker & PHP"},"content":{"rendered":"\n
Okay – it took me a while to get this configured correctly so I thought I’d share the setup with all of you. In the end, my issue was not setting Now, I run this in combination with a few PHP\/WordPress containers, make sure that you set the PHP sendmail path correctly in your php.ini file, like below:<\/p>\n\n\n\n And you should be all set!<\/p>\n\n\n\n Okay – it took me a while to get this configured correctly so I thought I’d share the setup with all of you. In the end, my issue was not setting -t -i in my sendmail path. Mailcrab Docker Compose setup Now, I run this in combination with a few PHP\/WordPress containers, make sure that […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1],"tags":[],"acf":[],"yoast_head":"\n-t -i <\/code>in my sendmail path.<\/p>\n\n\n\n
Mailcrab Docker Compose setup<\/h4>\n\n\n\n
mailcrab:\n container_name: mailcrab\n image: marlonb\/mailcrab:latest\n ports:\n - '1080:1080'\n - '1025:1025'<\/code><\/pre>\n\n\n\n
sendmail_path = \/usr\/sbin\/sendmail -t -i -S mailcrab:1025<\/code><\/pre>\n\n\n\n
Sample docker-compose file for PHP container<\/h4>\n\n\n\n
php:\n container_name: ${SITENAME:-wordpress}-php\n build:\n context: .\n dockerfile: docker\/php\/Dockerfile\n args:\n - UID=${UID:-1000}\n - GID=${GID:-1000}\n volumes:\n - .\/data:\/var\/www\/html\n - .\/logs\/php.log:\/var\/log\/fpm-php.www.log\n - .\/docker\/php\/default.conf:\/usr\/local\/etc\/php\/conf.d\/local.ini<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"