Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postfix QID in Milter #27

Open
avinash-ghadshi opened this issue Jan 3, 2023 · 2 comments
Open

Postfix QID in Milter #27

avinash-ghadshi opened this issue Jan 3, 2023 · 2 comments

Comments

@avinash-ghadshi
Copy link

Hi emersion,

Is there any way to get Postfix QID in Milter?

When I send mail using sendmail I get below log in postfix mail log

Jan  3 11:44:49 NL880 postfix/smtpd[596033]: C8D33E07DCF: client=localhost[127.0.0.1]
Jan  3 11:44:49 NL880 postfix/cleanup[596037]: C8D33E07DCF: message-id=<b5iu3af6x5e7.1672726489@test.com>
Jan  3 11:44:49 NL880 postfix/qmgr[584856]: C8D33E07DCF: from=<test@test.com>, size=556, nrcpt=1 (queue active)

I want C8D33E07DCF in Milter Function.
Please help!

@iredmail
Copy link

iredmail commented Jan 3, 2023

Read the postfix doc please: https://www.postfix.org/MILTER_README.html

@Isma399
Copy link

Isma399 commented Nov 7, 2023

Maybe something like that:

func (s *Session) Header(name string, value string, m *milter.Modifier) (milter.Response, error) {
	if s.queueId == "" {
		s.queueId = m.Macros["i"] + ":"
	}

Postfix seems to wait DATA step to create the queue_id
The macros i in Postfix is the queue_id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants