[pfx] Re: How can I set up a very simple postfix server
Wietse Venema via Postfix-users wrote in <4rw8mh2rcwzj...@spike.porcupine.org>: |Steffen Nurpmeso via Postfix-users: |>|Alls you need is to 'mount' the maildtop directory into a container |>|with read/write permission, and install the Postfix sendmail and |>|postdrop programs insalled in the container. As long as there is a |>|Postfix pickup daemon running somewhere, it will pick up new messages |>|in at most 60 seconds. |> |> "The problem" (i have given up and did not try it for long) is the |> configuration directory. Does this work without configuration |> directory? I had to try again. | |You need at a minimum: | |- passwd/shadow/group entries for postdrop Sure. (Well, at least here.) |- $config_directory/main.cf with sendail_path, setgid-group, queue_direc\ |tory, command_directory |- sendmail and postdrop binaries These from a default installation, then. |- maildrop directory That i will try to --bind mount(1)ing from real into unshare(1) ip(8) netns container to where the default installation expects it, then. (Next time i will do this.) Thank you for the information. --steffen | |Der Kragenbaer,The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Steffen Nurpmeso via Postfix-users: > |Alls you need is to 'mount' the maildtop directory into a container > |with read/write permission, and install the Postfix sendmail and > |postdrop programs insalled in the container. As long as there is a > |Postfix pickup daemon running somewhere, it will pick up new messages > |in at most 60 seconds. > > "The problem" (i have given up and did not try it for long) is the > configuration directory. Does this work without configuration > directory? I had to try again. You need at a minimum: - passwd/shadow/group entries for postdrop - $config_directory/main.cf with sendail_path, setgid-group, queue_directory, command_directory - sendmail and postdrop binaries - maildrop directory Wietse ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Peter via Postfix-users wrote in <8b2661ea-5560-af5a-e674-d2fb10094...@pajamian.dhs.org>: |On 23/08/23 11:58, Steffen Nurpmeso via Postfix-users wrote: |> "The problem" (i have given up and did not try it for long) is the |> configuration directory. Does this work without configuration |> directory? I had to try again. |> |> So last i tried. |> If you do not compile custom, but still want a custom |> configuration (directory), you need command line options. | |Or you can set the MAIL_CONFIG environment variable, which should be |easy enough to do system-wide. Hm. Whereas this is also an idea for anything session-like (not explicitly cleared thereof that is) i have not thought of, it does not solve "the problem of directory access". But as this seems to me only my problem (occasionally container support shows up, but that is something different .. i think) i am fine with as it is. But i will try out Wietse Venema's suggestion soonish, ie, basic installation in /etc/ but which does not drive the real postfix, and then "making the maildrop available" to the basic installation. --steffen | |Der Kragenbaer,The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Dnia 23.08.2023 o godz. 09:43:08 Henrik Y via Postfix-users pisze: > Maybe another option is mutt command? > > echo "Body Of the Email" | mutt -a "File_Attachment.csv" -s "Daily > Report for $(date)" -c u...@addr.com -y Mutt calls /usr/sbin/sendmail anyway to send mail, so that doesn't seem to solve anything. -- Regards, Jaroslaw Rafa r...@rafa.eu.org -- "In a million years, when kids go to school, they're gonna know: once there was a Hushpuppy, and she lived with her daddy in the Bathtub." ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
On Wed, Aug 23, 2023 at 01:36:29PM +1200, Peter via Postfix-users wrote: > > "The problem" (i have given up and did not try it for long) is the > > configuration directory. Does this work without configuration > > directory? I had to try again. The default Postfix directory (the one compiled into the executables) must exist, and hold at a main.cf file for Postfix local submission to work. - postdrop(1) is setgid, and when invoked by a non-privileged user only trusts MAIL_CONFIG if it is either the default configuration directory, or that one of one of the configured secondary instances. - The spool directory must exist, and have a maildrop subdirectory with the right ownership. > > So last i tried. If you do not compile custom, but still want a > > custom configuration (directory), you need command line options. > > Or you can set the MAIL_CONFIG environment variable, which should be > easy enough to do system-wide. With postdrop(1) this only works for root. -- VIktor. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Maybe another option is mutt command? echo "Body Of the Email" | mutt -a "File_Attachment.csv" -s "Daily Report for $(date)" -c u...@addr.com -y Peter via Postfix-users wrote: Or you can set the MAIL_CONFIG environment variable, which should be easy enough to do system-wide. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
On 23/08/23 11:58, Steffen Nurpmeso via Postfix-users wrote: "The problem" (i have given up and did not try it for long) is the configuration directory. Does this work without configuration directory? I had to try again. So last i tried. If you do not compile custom, but still want a custom configuration (directory), you need command line options. Or you can set the MAIL_CONFIG environment variable, which should be easy enough to do system-wide. Peter ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Wietse Venema via Postfix-users wrote in <4rvkgl4lfyzj...@spike.porcupine.org>: |Steffen Nurpmeso via Postfix-users: |> "But" postfix's sendmail reads the postfix configuration, it will |> not work otherwise, at least once i tried last. |> Going over SMTP (submission that is) can share a single postfix |> instance in between many containers that do not have access to |> the actual configuration, filesystem-wise. |> |> Often i have wished postfix's sendmail(1) would work otherwise; |> i also used dma (DragonFly Mail Agent) as is now used by default |> on FreeBSD for that purpose (which was quite messy installation- |> order wise), ie, simple sendmail that relays to real postfix. |> |> Yes, a compile-time configuration option, and a postdrop that |> listens via UNIX domain socket on a path that can be mounted into |> containers, and a postfix sendmail that only works on that path, |> that would be a nice thing container-wise, wouldn't it? |> Just an idea... | |Alls you need is to 'mount' the maildtop directory into a container |with read/write permission, and install the Postfix sendmail and |postdrop programs insalled in the container. As long as there is a |Postfix pickup daemon running somewhere, it will pick up new messages |in at most 60 seconds. "The problem" (i have given up and did not try it for long) is the configuration directory. Does this work without configuration directory? I had to try again. So last i tried. If you do not compile custom, but still want a custom configuration (directory), you need command line options. Yes, one could write a shell wrapper around /usr/sbin/sendmail which applies the necessary hints (and needs to be reinstalled as a replacement after each update). But this works only for root. Unless the path all through to the configuration etc is +[r]x for all users -- and this counteracts the host-specific configuration as i it use for the other daemons i drive: these live under /root/hosts/$HOSTNAME/. Actually, you know, this is all git(1) driven; some branches (bin, linux.kconfig, ..., $HOSTNAME), and then you join only those branches into $HOSTNAME that are needed, and then you "git push $HOSTNAME" to that host. Each host only has its own branch. On each $HOSTNAME you can use bin/backup.sh (which reads /root/hosts/$HOSTNAME/backup) to backup some host-specific files (mostly resolv.conf, hosts, and whatever is only there), commit that, and then you can "git fetch" that back to the "super server" which has all the git branches. This sounds messy but does not require any external software like puppet or how it is called and such (Ansible?), and for hosts with identical hardware you effectively can share branches with just a few lines of "git diff HOST1 HOST2". |Originally. Postfix was designed to support NFS file sharing, where |the maildrop direcfory is shared read/write, the server runs a full |Postfix install, and the clients have Postfix sendmil and postdrop |programs. You mean, clients have a minimal configuration just to find the maildrop directory, and nothing else? This is sufficient? --steffen | |Der Kragenbaer,The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Steffen Nurpmeso via Postfix-users: > "But" postfix's sendmail reads the postfix configuration, it will > not work otherwise, at least once i tried last. > Going over SMTP (submission that is) can share a single postfix > instance in between many containers that do not have access to > the actual configuration, filesystem-wise. > > Often i have wished postfix's sendmail(1) would work otherwise; > i also used dma (DragonFly Mail Agent) as is now used by default > on FreeBSD for that purpose (which was quite messy installation- > order wise), ie, simple sendmail that relays to real postfix. > > Yes, a compile-time configuration option, and a postdrop that > listens via UNIX domain socket on a path that can be mounted into > containers, and a postfix sendmail that only works on that path, > that would be a nice thing container-wise, wouldn't it? > Just an idea... Alls you need is to 'mount' the maildtop directory into a container with read/write permission, and install the Postfix sendmail and postdrop programs insalled in the container. As long as there is a Postfix pickup daemon running somewhere, it will pick up new messages in at most 60 seconds. Originally. Postfix was designed to support NFS file sharing, where the maildrop direcfory is shared read/write, the server runs a full Postfix install, and the clients have Postfix sendmil and postdrop programs. Wietse ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Peter via Postfix-users wrote in <5080e33a-0d10-d028-d59e-0481024e3...@pajamian.dhs.org>: |On 22/08/23 15:42, Bruce Dubbs via Postfix-users wrote: |> I have built postfix-3.8.1 from source and want to use it only on the |> local system. That is, I really only want it to receive messages from |> applications like sudo, cron, or some simple scripts using mailx and |> post it to the local user's mailbox. | |You've already over-complicated it. For starters building from source, For his explicitly stated use case i agree with you. |while admirable, is almost certainly not going to be required for the |simple use-case you have. I would just install the postfix that your |distro packages for you, it may be an older version but nothing you are |doing requires the latest bleeding-edge version of postfix, or anything |near to it. ... |> bdubbs@pippin120$ mail -s test root |> smtp-server: 530 5.7.0 Must issue a STARTTLS command first ... |This means that mailx has been reconfigured from it's default to attempt |to use either submission or smtp. If you want to keep it simple then |you don't need to do this, just let mailx use the sendmail binary which |in postfix uses the postdrop command and mail gets picked up by the |pickup service, all of which are enabled and properly configured by \ |default. "But" postfix's sendmail reads the postfix configuration, it will not work otherwise, at least once i tried last. Going over SMTP (submission that is) can share a single postfix instance in between many containers that do not have access to the actual configuration, filesystem-wise. Often i have wished postfix's sendmail(1) would work otherwise; i also used dma (DragonFly Mail Agent) as is now used by default on FreeBSD for that purpose (which was quite messy installation- order wise), ie, simple sendmail that relays to real postfix. Yes, a compile-time configuration option, and a postdrop that listens via UNIX domain socket on a path that can be mounted into containers, and a postfix sendmail that only works on that path, that would be a nice thing container-wise, wouldn't it? Just an idea... ... --steffen | |Der Kragenbaer,The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
On 8/22/23 14:36, Phil Stracchino via Postfix-users wrote: On 8/22/23 15:14, Bruce Dubbs via Postfix-users wrote: On 8/22/23 04:16, Wietse Venema via Postfix-users wrote: Bruce Dubbs via Postfix-users: I have built postfix-3.8.1 from source and want to use it only on the local system. That is, I really only want it to receive messages from applications like sudo, cron, or some simple scripts using mailx and post it to the local user's mailbox. My problem is that postfix keeps rejecting the messages. For instance: ... smtp-server: 530 5.7.0 Must issue a STARTTLS command first "/home/bdubbs/dead.letter" 11/293 . . . message not sent. That is SENDMAIL not POSTFIX. What is your operating system? The choice of mail server may be configured with /sbin/alternatives or /usr/sbin/mailwrapper. I am using linuxfromscratch. I did figure out the STARTTLS problem because of an incorrect value in the mailx configuration file. I'm still having delivery issues, but I think I can figure it out. I'll come back if I cannot. If you want it to work ONLY on the local system, why are you using a mail TRANSFER agent at all, instead of just a local delivery agent? A mail transfer agent's job is fundamentally to move mail from one system to another. I did figure out my problem. My use was just for testing. Sorry for the noise. -- Bruce ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
On 8/22/23 15:14, Bruce Dubbs via Postfix-users wrote: On 8/22/23 04:16, Wietse Venema via Postfix-users wrote: Bruce Dubbs via Postfix-users: I have built postfix-3.8.1 from source and want to use it only on the local system. That is, I really only want it to receive messages from applications like sudo, cron, or some simple scripts using mailx and post it to the local user's mailbox. My problem is that postfix keeps rejecting the messages. For instance: ... smtp-server: 530 5.7.0 Must issue a STARTTLS command first "/home/bdubbs/dead.letter" 11/293 . . . message not sent. That is SENDMAIL not POSTFIX. What is your operating system? The choice of mail server may be configured with /sbin/alternatives or /usr/sbin/mailwrapper. I am using linuxfromscratch. I did figure out the STARTTLS problem because of an incorrect value in the mailx configuration file. I'm still having delivery issues, but I think I can figure it out. I'll come back if I cannot. If you want it to work ONLY on the local system, why are you using a mail TRANSFER agent at all, instead of just a local delivery agent? A mail transfer agent's job is fundamentally to move mail from one system to another. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
On 8/22/23 04:16, Wietse Venema via Postfix-users wrote: Bruce Dubbs via Postfix-users: I have built postfix-3.8.1 from source and want to use it only on the local system. That is, I really only want it to receive messages from applications like sudo, cron, or some simple scripts using mailx and post it to the local user's mailbox. My problem is that postfix keeps rejecting the messages. For instance: ... smtp-server: 530 5.7.0 Must issue a STARTTLS command first "/home/bdubbs/dead.letter" 11/293 . . . message not sent. That is SENDMAIL not POSTFIX. What is your operating system? The choice of mail server may be configured with /sbin/alternatives or /usr/sbin/mailwrapper. I am using linuxfromscratch. I did figure out the STARTTLS problem because of an incorrect value in the mailx configuration file. I'm still having delivery issues, but I think I can figure it out. I'll come back if I cannot. -- Bruce ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
On 22/08/23 22:59, Peter via Postfix-users wrote: You forgot: smtpd_tls_auth_only = no Sorry, scratch this last bit, it's only if you need to do AUTH without TLS, and I don't think you're trying to do AUTH here. Peter ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
On 22/08/23 15:42, Bruce Dubbs via Postfix-users wrote: I have built postfix-3.8.1 from source and want to use it only on the local system. That is, I really only want it to receive messages from applications like sudo, cron, or some simple scripts using mailx and post it to the local user's mailbox. You've already over-complicated it. For starters building from source, while admirable, is almost certainly not going to be required for the simple use-case you have. I would just install the postfix that your distro packages for you, it may be an older version but nothing you are doing requires the latest bleeding-edge version of postfix, or anything near to it. My problem is that postfix keeps rejecting the messages. For instance: bdubbs@pippin120$ mail -s test root smtp-server: 530 5.7.0 Must issue a STARTTLS command first "/home/bdubbs/dead.letter" 11/293 . . . message not sent. This means that mailx has been reconfigured from it's default to attempt to use either submission or smtp. If you want to keep it simple then you don't need to do this, just let mailx use the sendmail binary which in postfix uses the postdrop command and mail gets picked up by the pickup service, all of which are enabled and properly configured by default. I have tried several options, but nothing seems to avoid this situation. I've changed the default master.cl to have: smtp inet n - n - - smtpd -o smtpd_tls_security_level=none -o smtp_tls_security_level=none -o smtpd_sasl_auth_enable=no I would comment this section out entirely, you do not need nor should you be using port 25 smtp unless your postfix instance is going to receive mail from other servers on the internet. 127.0.0.1:submission inet n - n - - smtpd -o smtpd_tls_security_level=none -o smtp_tls_security_level=none -o smtpd_sasl_auth_enable=no Disabling tls is not a great idea here, but is okay since you're limiting it to localhost. Do keep in mind that you do not need this at all if you go by my suggestion above to use the sendmail binary (which is properly configured by default). and main.cf changes: # myhostname is not a valid internet name, but is in /etc/hosts myhostname = pippin120.gdc.com mydomain = gdc.com These are fine, although not really required or relevant if you're only doing delivery to local mailboxes. inet_interfaces = 127.0.0.1 This is fine, although it's redundant with the specified 127.0.0.1 for the submission service above. It also won't matter if you end up just using the sendmail binary as suggested. That said, you can set this to loopback_only or localhost for a bit more flexibility. mydestination = $myhostname, localhost.$mydomain, localhost mynetworks = 192.168.0.0/24, 127.0.0.0/8 If you use the sendmail binary then you can set this to blank (mynetworks=) # Try to avoid TLS smtpd_tls_security_level = none smtp_tls_security_level = none smtp_sasl_auth_enable = no smtp_use_tls = no You forgot: smtpd_tls_auth_only = no Peter ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Dnia 21.08.2023 o godz. 22:42:22 Bruce Dubbs via Postfix-users pisze: > I have built postfix-3.8.1 from source and want to use it only on > the local system. That is, I really only want it to receive messages > from applications like sudo, cron, or some simple scripts using > mailx and post it to the local user's mailbox. > > My problem is that postfix keeps rejecting the messages. For instance: > > bdubbs@pippin120$ mail -s test root > smtp-server: 530 5.7.0 Must issue a STARTTLS command first > "/home/bdubbs/dead.letter" 11/293 > . . . message not sent. For this, you don't need to submit messages via SMTP (you actually don't need submission services runing at all), just via /usr/sbin/sendmail like cron, sudo etc. usually do. -- Regards, Jaroslaw Rafa r...@rafa.eu.org -- "In a million years, when kids go to school, they're gonna know: once there was a Hushpuppy, and she lived with her daddy in the Bathtub." ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: How can I set up a very simple postfix server
Bruce Dubbs via Postfix-users: > I have built postfix-3.8.1 from source and want to use it only on the local > system. > That is, I really only want it to receive messages from applications like > sudo, cron, > or some simple scripts using mailx and post it to the local user's mailbox. > > My problem is that postfix keeps rejecting the messages. For instance: > ... > smtp-server: 530 5.7.0 Must issue a STARTTLS command first > "/home/bdubbs/dead.letter" 11/293 > . . . message not sent. That is SENDMAIL not POSTFIX. What is your operating system? The choice of mail server may be configured with /sbin/alternatives or /usr/sbin/mailwrapper. Wiewtse ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org