Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641768 - mail-mta/ssmtp-2.64-r3: MinUserId no longer working
Summary: mail-mta/ssmtp-2.64-r3: MinUserId no longer working
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-19 21:37 UTC by Tommy Pettersson
Modified: 2019-03-26 20:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tommy Pettersson 2017-12-19 21:37:44 UTC
I set Root=me@example.com and MinUserId=65536 so that emails to all local users are sent to me@example.com. After upgrading from -r2 to -r3 the value of MinUserId is ignored, because patch 0120_all_aliases.patch undoes a vital part of patch 0010_all_maxsysuid.patch. The following patch restores MinUserId:

Index: work/ssmtp-2.64/ssmtp.c
===================================================================
--- work.orig/ssmtp-2.64/ssmtp.c
+++ work/ssmtp-2.64/ssmtp.c
@@ -702,7 +702,7 @@ char *rcpt_remap(char *str)
 	rcpt = aliases_lookup(str);
 
 	if((root==NULL) || strlen(root)==0 || strchr(rcpt, '@') ||
-		((pw = getpwnam(rcpt)) == NULL) || (pw->pw_uid > MAXSYSUID)) {
+		((pw = getpwnam(rcpt)) == NULL) || (pw->pw_uid >= minuserid)) {
 		return(append_domain(rcpt));   /* It's not a local systems-level user */
 	}
 	else {



Reproducible: Always